Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Idiomatic Dart: null safety, async, Flutter-ready patterns, packages, and tooling. Use when writing, reviewing, or structuring Dart code (Flutter or server/CLI).
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Dart's design — sound null safety, approachable async, and a productive standard library — makes it a strong language beyond Flutter (servers, CLIs, scripting). Professional Dart means using null safety as intended, writing async code structurally, modeling with immutable classes and sealed hierarchies, and organizing packages cleanly.
The through-line: null-safe by construction, async without callbacks, and code that reads plainly.
String can't be null); ? marks genuine
absence; ! asserts non-null (use sparingly — each is a potential crash); late for
definitely-assigned-later fields (initialization discipline, not a null-safety escape hatch).
Flow analysis + smart promotion mean well-structured code rarely needs casts.async/await for futures; Stream for sequences of events with
await for, map/where transforms, and broadcast vs single-subscription semantics;
Isolate for true parallelism (CPU work off the main isolate — no shared memory, message
passing only).sealed class Result with subtypes, exhaustive switch
— the compiler enforces handling every case. Destructuring patterns in variable declarations
and if-case keep parsing code clean.final fields, const constructors where possible, copyWith for
variations. Immutable state is the foundation of predictable Flutter UIs and testable logic.pubspec.yaml declares deps with version constraints; dart pub get
resolves; lock file committed for apps. Organize by feature in lib/; keep src/ private with
a barrel export file when publishing packages.dart analyze + flutter_lints (or stricter very_good_analysis
rules) in CI. Lints catch real bugs (unawaited futures, unnecessary null assertions) — not just style.dart create (or flutter create), null-safe SDK constraint, lints package,
analysis_options.yaml wired up, tests in test/.copyWith,
enums with fields/methods for rich fixed sets. Validate in factories.await chains over .then pyramids; streams for event flows
with proper subscription lifecycle (cancel!); isolates for CPU-bound work, not I/O.try/catch at boundaries; custom exception types with context;
Future.error only deliberately; never swallow errors silently — log with context.package:test (or flutter_test): unit-test pure logic and models,
widget-test UI interactions, integration-test critical journeys. Mock at boundaries (HTTP,
platform channels), not at your own domain.const widgets where static to reduce rebuild cost.Idiomatic snippets:
// Sealed result + exhaustive switch
sealed class LoadResult<T> {}
final class Loaded<T> extends LoadResult<T> { final T data; Loaded(this.data); }
final class LoadFailed<T> extends LoadResult<T> { final String message; LoadFailed(this.message); }
String describe<T>(LoadResult<T> r) => switch (r) {
Loaded(:var data) => 'Loaded: $data',
LoadFailed(:var message) => 'Failed: $message',
};
// Immutable model with copyWith
class Order {
final String id; final int totalCents; final bool paid;
const Order({required this.id, required this.totalCents, this.paid = false});
Order copyWith({bool? paid}) => Order(id: id, totalCents: totalCents, paid: paid ?? this.paid);
}
! as a habit. Null-assertion operators scattered to silence the analyzer reintroduce the
crashes null safety was built to prevent. Restructure so promotion works, or handle the null.late abuse. late fields that throw LateInitializationError in production because
initialization order wasn't guaranteed. Prefer nullable + explicit init, or constructor init.unawaited_futures lint exists for this.compute()/isolates for CPU work; async I/O is already non-blocking.dart analyze warnings treated as noise. Many Dart lints encode real
correctness lessons — keep the analyzer clean in CI.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
中文简介正在准备中。当前显示原文说明。
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
中文简介正在准备中。当前显示原文说明。
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
中文简介正在准备中。当前显示原文说明。
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
中文简介正在准备中。当前显示原文说明。
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
中文简介正在准备中。当前显示原文说明。