Dart Sdk Changelog 标志

Dart Sdk Changelog

社区
RandalSchwartz
dart-sdk-changelog

Authoritative guide for Dart SDK language specifications, syntax availability, minimum SDK constraints (minSdk), and version changelogs from Dart 1.x through Dart 3.x. Use this skill whenever authoring or refactoring Dart code, inspecting pubspec.yaml sdk constraints, writing control flow (switch statements, pattern matching, switch expressions), implementing class constructors (primary constructors, parameter shorthands), using macros/augmentations, verifying language feature availability against the project's minSdk, or modernizing legacy codebases.

Add to TypingMind

概览

发布者RandalSchwartz
代码仓库dart-sdk-skills
技能名称dart-sdk-changelog
星标数
35
复刻数
1
附带文件
16
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 16 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 RandalSchwartz 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Dart Sdk Changelog AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/RandalSchwartz/dart-sdk-skills/tree/main/skills/dart-sdk-changelog
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/RandalSchwartz/dart-sdk-skills.git /tmp/dart-sdk-skills
mkdir -p .claude/skills
cp -r /tmp/dart-sdk-skills/skills/dart-sdk-changelog .claude/skills/dart-sdk-changelog
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Dart Sdk Changelog,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Dart Sdk Changelog。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Dart Sdk Changelog 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Dart SDK Changelog & Version Feature Guide (Dart 1.x to Modern Dart 3.x)

This skill provides an authoritative, structured guide to Dart language features, core library APIs, tooling changes, version requirements, experimental feature flags (--enable-experiment), static metaprogramming (Macros & Augmentations), and legacy modernization runbooks sourced directly from the official Dart SDK CHANGELOG.


🎯 Parent Guide: How to Find the minSdk for Any Dart Feature or API

When writing or reviewing Dart code, selecting the correct minimum SDK lower bound (minSdk) in pubspec.yaml is essential to ensure syntax and core APIs compile across target environments.

1. Language Version vs. SDK Version

  • Language Version (major.minor): In pubspec.yaml, the lower bound of environment.sdk (for example ^3.13.0 or >=3.12.0 <4.0.0) dictates which language grammar and compiler semantics are enabled.
    • Patch numbers (.1, .2) do not affect language grammar.
    • Using a Dart 3.13 feature (like Primary Constructors) requires sdk: '^3.13.0'.
  • Core Library APIs: Methods and classes (for example Future.pause, List.unmodifiableOf) are added in specific SDK versions.
  • Per-file override: A file can specify // @dart = 3.12 on line 1 to force an earlier language version.

2. Fast minSdk Language Feature Matrix

Feature / SyntaxMinimum SDKExample SyntaxReference
Primary Constructors3.13.0class Point(var int x, var int y); / this : assert(...)3.13 Guide
Constructor Keyword Shorthands3.13.0new(this.x); / factory clone(...) => ...;3.13 Guide
Private Named Parameters3.12.0Point({required this._x, required this._y});3.12 Guide
Wildcard Variables (_)3.7.0var (_, b) = pair; / void fn(int _, int _)3.7 Guide
Type Inference Using Bounds3.7.0Inferred types respect type parameter bounds3.7 Guide
Digit Separators3.6.01_000_000, 0x4000_0000, 0.000_0013.6 Guide
Extension Types3.3.0extension type Meters(int value) {}3.0-3.5 Guide
Private Field Promotion3.2.0if (_privateFinalField != null) { ... }3.0-3.5 Guide
Records (Tuples)3.0.0(int, String) pair = (1, 'a');3.0-3.5 Guide
Pattern Matching & Destructuring3.0.0var (a, b) = pair; / switch (val) { case ... }3.0-3.5 Guide
Switch Expressions3.0.0var s = switch (e) { 0 => 'a', _ => 'b' };3.0-3.5 Guide
If-Case Statements & Elements3.0.0if (json case {'id': int id}) ...3.0-3.5 Guide
Sealed Classes & Exhaustiveness3.0.0sealed class State {}3.0-3.5 Guide
Class Modifiers (base, interface, final)3.0.0interface class Api {} / final class Token {}3.0-3.5 Guide
100% Sound Null Safety Enforced3.0.0Non-null-safe mode disallowed3.0-3.5 Guide
Super-Initializer Parameters2.17.0SubClass(super.name, {super.key});Dart 2 Milestones
Enhanced Enums2.17.0enum Status { ok(200); final int c; const Status(this.c); }Dart 2 Milestones
Named Arguments Anywhere2.17.0fn(1, named: 'a', 2);Dart 2 Milestones
Constructor Tear-Offs2.15.0List.filled, Point.newDart 2 Milestones
Triple-Shift Operator (>>>)2.14.0int result = a >>> b;Dart 2 Milestones
Generic Type Aliases (typedef)2.13.0typedef JsonMap = Map<String, dynamic>;Dart 2 Milestones
Sound Null Safety (?, late, !)2.12.0Sound static non-nullable typesDart 2 Milestones
Extension Methods2.7.0extension on String { ... }Dart 2 Milestones
Spread Operators (..., ...?)2.3.0[...list1, ...?maybeList]Dart 2 Milestones
Collection if and for2.3.0[if (cond) a, for (var x in l) x * 2]Dart 2 Milestones
Sound Type System & Optional new2.0.0Static sound types replace dynamic checksDart 2 Milestones

👉 For deep-dive and verification procedures, see How to Find minSdk and the Full Version Matrix.


⚡ Subskill Spotlights

Subskill: Augmentations & Static Metaprogramming (Macros)

  • Augmentation Syntax: Declare augment class, import augment, and wrap methods using augmented().
  • Macro Phases: Understand Type, Declaration, and Definition macro execution in the analysis server.
  • In-Memory Code Gen: Eliminate build_runner with zero-disk .g.dart pollution. 👉 Read the full Macros & Augmentations Guide.

Subskill: Experimental Features & Compiler Flags (--enable-experiment)

  • Enabling Experiments: Configure analysis_options.yaml (analyzer.enable-experiment), CLI flags (dart --enable-experiment=...), and VS Code settings.
  • Release Pipeline: Understand the graduation path across Beta preview, Stable-gated, and Stable-ungated tiers. 👉 Read the full Experimental Features Guide.

Subskill: Rescuing Legacy Codebases (Dart 1.x & Pre-2.12 to Modern Dart)

  • Sound Null Safety Migration: Transform @required annotations, uninitialized nullable fields, and defensive runtime assertions.
  • Dependency Upgrades: Modernize pubspec.yaml environment bounds and replace deprecated legacy packages (pedantic, tuple, etc.). 👉 Read the full Legacy Codebase Rescue Guide.

📚 Table of Contents (TOC) & Version Archive

Release / GuideFocus AreaKey AdditionsReference Document
Macros & AugmentationsMetaprogrammingaugment, augmented(), import augment, @JsonCodable(), 3-phase macro pipelineMacros & Augmentations Guide
Experimental FeaturesCompiler Flags--enable-experiment, Beta preview vs stable-gated release tiers, graduation matrixExperiments Guide
Legacy RescueMigration RunbookDart 1.x/2.x to Modern 3.x modernization pipeline, null-safety bridge, package replacementsRescue Guide
Dart 3.14CLI, SIMD & JS Interopdart migrate, dart run -e, NativeFinalizer.callback, rangeEquals, fast JS array & async Function.toJS conversions3.14 Reference
Dart 3.13Language & RuntimePrimary constructors, this constructor body, new/factory shorthands, Future.pause, List.unmodifiableOf3.13 Reference
Dart 3.12Language & ToolingPrivate named parameters (Point({this._x})), RegExp spans, dart run <pkg>@<ver>3.12 Reference
Dart 3.11Platform & PubWindows Unix domain sockets, Workspace globs (pkgs/*), dart pub cache gc3.11 Reference
Dart 3.10Extensibility & CLIAnalyzer plugins stable, Hooks (native assets) stable, dart install, @Deprecated constructors3.10 Reference
Dart 3.9Analysis & PubAOT analysis server, git tag version solving, null-safety assumptions in flow analysis3.9 Reference
Dart 3.8Formatter & DocsDoc imports (@docImport), tall formatter trailing comma preservation, Iterable.withIterator3.8 Reference
Dart 3.7Language & FormatterWildcard variables (_), inference using bounds, tall style formatter default, legacy web deprecations3.7 Reference
Dart 3.6Language & PubDigit separators (1_000_000), Pub workspaces, dart pub bump3.6 Reference
Dart 3.0 – 3.5Foundation & Major FeaturesRecords, Patterns, Switch Expressions, Sealed Classes, Class Modifiers, Extension Types, Field Promotion, Wasm3.0–3.5 Reference
Dart 2.0 – 2.19Historical MilestonesSound Null Safety (2.12), Enhanced Enums & Super-Params (2.17), Extension Methods (2.7), Spreads (2.3), Sound Type System (2.0)Dart 2 Milestones

🛠️ Recommended Runbooks

1. Working with Augmentations & Macros

  1. Review Macros & Augmentations Guide.
  2. Wire original files with import augment 'foo.g.dart'; and augmentation files with augment library 'foo.dart';.
  3. Use augment class, augment void method(), and call augmented() to wrap original logic.

2. Working with Experimental Feature Flags

  1. Check if the feature has already graduated to stable in the active SDK before adding a flag.
  2. If experimental, configure analysis_options.yaml under analyzer.enable-experiment: [name].
  3. Pass --enable-experiment=name to dart run, dart test, flutter run, and flutter test.
  4. Ensure experimental code is isolated so production packages remain publishable on pub.dev.

3. Modernizing / Rescuing a Legacy Codebase

  1. Check current language version from pubspec.yaml environment block.
  2. If pre-2.12, read the Legacy Rescue Guide.
  3. Execute the 4-stage pipeline: syntax cleanup → sound null safety → dependency bump (sdk: ^3.5.0 or ^3.13.0) → Dart 3 modernization.

4. Answering "What's New in Dart X.Y"

  1. Identify the requested version.
  2. Read the corresponding reference document under references/.
  3. Provide:
    • Language syntax changes with before/after code snippets.
    • Core library additions (dart:core, dart:async, dart:io, dart:js_interop, dart:isolate, dart:ffi).
    • Tooling and CLI features (dart analyze, dart format, dart pub, dart build).
    • Breaking changes and migration instructions.

5. Answering "How to find minSdk for X"

  1. Check the Language Feature Matrix and How to Find minSdk Guide.
  2. Specify the exact lower bound SDK constraint for pubspec.yaml (for example sdk: '^3.13.0').
  3. Explain if the feature is a language grammar feature (requiring language version update) or a core library API.
  4. Show how to verify using dart analyze.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Dart Sdk Changelog AI 技能有什么作用?

Authoritative guide for Dart SDK language specifications, syntax availability, minimum SDK constraints (minSdk), and version changelogs from Dart 1.x through Dart 3.x. Use this skill whenever authoring or refactoring Dart code, inspecting pubspec.yaml sdk constraints, writing control flow (switch statements, pattern matching, switch expressions), implementing class constructors (primary constructors, parameter shorthands), using macros/augmentations, verifying language feature availability against the project's minSdk, or modernizing legacy codebases.

为什么在 TypingMind 中使用 Dart Sdk Changelog?

因为您只需安装一次,就能搭配任何模型使用。Dart Sdk Changelog 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Dart Sdk Changelog?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/RandalSchwartz/dart-sdk-skills/tree/main/skills/dart-sdk-changelog。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Dart Sdk Changelog?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Dart Sdk Changelog 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Dart Sdk Changelog 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Dart Sdk Changelog AI 技能免费吗?

是的。RandalSchwartz 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇