dart-use-primary-constructors
Modernize Dart Constructors Safely
Dart primary constructors introduce new syntax and scoping rules that can make migrations difficult. This skill explains the rules and guides correct refactoring from traditional constructors.
自分のエージェントでインストール
このリクエストをエージェントにコピーしてください。正規の Skill ページとマニフェストが含まれています。
Review the Skillstore skill "dart-use-primary-constructors" from https://skillstore.io/skills/flutter-dart-use-primary-constructors.md and its manifest at https://skillstore.io/api/skills/flutter-dart-use-primary-constructors/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.エージェントは引き続き計画を提示し、セキュリティポリシーで必要な確認を求める必要があります。
エージェントが読めるリソース
AI エージェント、クローラー、スクリプトがページ全体ではなく整理されたコンテキストを必要とする場合は、これらのリンクを使ってください。
テストする
「dart-use-primary-constructors」を使用しています。 Convert a User class with final name and age fields and a matching generative constructor.
期待される結果:
A compact primary constructor declaration that preserves the two final fields, followed by an explanation of declaring parameters.
「dart-use-primary-constructors」を使用しています。 Why does a late field initializer not see my primary constructor parameter?
期待される結果:
An explanation that primary initializer scope applies to non-late field initializers, with options for restructuring the initialization.
「dart-use-primary-constructors」を使用しています。 Review a class with a named secondary constructor after migration.
期待される結果:
A review that identifies whether the in-body constructor redirects to the primary constructor and describes the required correction.
セキュリティ監査
安全All 62 static findings are false positives. The scanner interpreted Markdown backticks in Dart and YAML documentation as shell execution, and misread a Dart late-field diagnostic as reconnaissance. No command execution, data access, network activity, prompt injection, or malicious intent was found in SKILL.md.
リスク要因
⚙️ 外部コマンド (50)
このレポートを共有・引用
バージョン付き評価レポート、中立的なバッジ、埋め込みカード、引用を共有できます。Skillstore は証拠を報告しますが、この Skill が安全かどうかは判断しません。
レポートリンクをコピー
https://skillstore.io/skills/flutter-dart-use-primary-constructors/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdownバッジ
[](https://skillstore.io/skills/flutter-dart-use-primary-constructors?utm_source=security_passport_badge)HTMLバッジ
<a href="https://skillstore.io/skills/flutter-dart-use-primary-constructors?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/flutter-dart-use-primary-constructors/security.svg" alt="Skillstore security assessment" loading="lazy"></a>埋め込みカード
<iframe src="https://skillstore.io/embed/skills/flutter-dart-use-primary-constructors.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学術引用 (APA · BibTeX · CFF)
APA形式の引用
flutter. (2026). dart-use-primary-constructors security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/flutter-dart-use-primary-constructors/audits/1BibTeX形式の引用
@techreport{flutter-flutter-dart-use-primary-constructors-2026,
author = {flutter},
title = {dart-use-primary-constructors security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/flutter-dart-use-primary-constructors/audits/1},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "dart-use-primary-constructors security audit report (audit version 1)"
version: "unspecified"
type: report
authors:
- name: "flutter"
date-released: "2026-08-30"
url: "https://skillstore.io/skills/flutter-dart-use-primary-constructors/audits/1"
identifiers:
- type: other
value: "skillstore:flutter-dart-use-primary-constructors:audit:1"
description: "Skillstore immutable audit report identifier"
バリアントを比較
インストール可能なバリアント 2 件各作者のスキルは個別のインストール項目として維持されます。推奨バリアントは Skillstore の証拠で順位付けされます。
このバリアントが首位の理由
Skillstore スコア
このスコアの理由 証拠の信頼度: 中作成できるもの
Learn the new syntax
Understand primary constructor declarations, fields, and empty-body shorthand before using the feature.
Refactor a Flutter model
Convert a simple data model from a traditional generative constructor to a primary constructor.
Resolve migration diagnostics
Interpret common initialization and late-field errors while adopting the new constructor forms.
これらのプロンプトを試す
Explain Dart primary constructors with a short example. State the minimum Dart version required.
Convert this Dart class to a primary constructor when valid. Explain each change and preserve behavior: [paste class].
Review this primary constructor for initializer-scope and late-field errors. Identify invalid references and provide a corrected version: [paste class].
Create a migration plan for these Dart classes. Identify classes eligible for primary constructors, redirecting constructor changes, and compiler checks: [paste files].
ベストプラクティス
- Confirm the project Dart version and experiment settings before migrating.
- Run the Dart analyzer and tests after each constructor migration.
- Keep non-late derived field initializers close to the primary constructor declaration.
回避
- Do not use primary constructors in Dart versions that do not support them.
- Do not reference primary constructor parameters from late field initializers.
- Do not keep non-redirecting generative constructors beside a primary constructor.