applying-effective-dart — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited applying-effective-dart (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Covers Dart 3 features (through 3.10) and Effective Dart practices for writing safe, maintainable code.
#### 1.1 Records Records aggregate multiple typed values without requiring a dedicated class.
// ✅ Recommended Usage
({double lat, double lon}) getLocation(String city) {
return (lat: 25.0330, lon: 121.5654);
}#### 1.2 Patterns and Destructuring Patterns match and destructure data from Records, Lists, Maps, and custom objects.
if-case to validate shape and extract variables simultaneously. // ✅ Recommended Usage
final json = {'user': ['Zack', 25]};
if (json case {'user': [String name, int age]}) {
print('User $name is $age years old.');
}#### 1.3 switch Expressions and Exhaustive Checking switch expressions return values and provide compile-time exhaustiveness for sealed classes and enums.
default so the compiler catches unhandled cases when new variants are added.#### 1.4 Class Modifiers Dart 3 class modifiers control inheritance and implementation boundaries.
implements only; prevents extends.extends and implements from external libraries.#### 1.5 Wildcard Variables — Dart 3.7 Local variables and parameters named _ are now non-binding — they can be declared multiple times without name collision, and their value cannot be read.
// Multiple _ params in constructors — no collision
Foo(_, this._, super._) {}
// Discard unused callback args cleanly
list.where((_) => true);
// Multiple discards in the same scope
var _ = expensiveCall1();
var _ = expensiveCall2(); // OK — no shadowing errorTop-level names, field names, and class names called _ are unchanged — this only applies to local variables and parameters.
#### 1.6 Null-Aware Collection Elements — Dart 3.8 Prefix a nullable expression with ? inside a collection literal to omit it when null. Works in lists, sets, and maps.
String? lunch = isTuesday ? 'tacos' : null;
int? count = hasItems ? items.length : null;
// ❌ Before 3.8
var old = [if (lunch != null) lunch, if (count != null) count];
// ✅ Dart 3.8+
var menu = [?lunch, ?count]; // nulls are silently excluded
// Works in maps too
final headers = <String, String>{
'Content-Type': 'application/json',
if (token != null) 'Authorization': 'Bearer $token', // old style
?'X-Custom': customHeader, // ✅ null-aware
};#### 1.7 Dot Shorthands — Dart 3.10 Omit the type name when accessing a static member or constructor in a context where the expected type is already known.
// ❌ Before 3.10
Color color = Color.blue;
Widget w = Padding(padding: EdgeInsets.all(16), child: ...);
crossAxisAlignment: CrossAxisAlignment.start,
// ✅ Dart 3.10+
Color color = .blue;
Widget w = Padding(padding: .all(16), child: ...); // EdgeInsets inferred
crossAxisAlignment: .start,
mainAxisSize: .min,
// Works in switch cases
switch (color) {
case .blue: print('blue');
case .red: print('red');
}Dot shorthands work for: enum values, static fields, static methods, and named constructors — anywhere the context type is known.
Consistent style enables collaboration.
dart format and enable core or recommended lints in analysis_options.yaml.UpperCamelCaselowercase_with_underscoreslowerCamelCaselowerCamelCase (e.g., const defaultTimeout = 1000;) — not SCREAMING_CAPS.#### 3.1 Variables and Types
var/final for local variables; omit type annotations where the compiler infers correctly.var list = [];). Use spread operators and collection if/for instead of .add() calls.#### 3.2 Functions and Async
=> for single-expression functions.required as needed.async/await over .then()/.catchError() chains.#### 3.3 Null Safety
if (value != null)) or pattern matching instead of forced unwrapping.[?nullable] over [if (x != null) x] for cleaner collection literals (Dart 3.8+).#### 3.4 Async Annotations — Dart 3.9
Future-returning method to suppress unawaited_futures lint at the call site when intentionally fire-and-forget._.get for property-like reads with no side effects or expensive computation. Don't add setters for every property — prefer final constructor initialization.User.fromJson) and redirecting constructors for semantics. Provide const constructors wherever possible.| Lint | Purpose |
|---|---|
switch_on_type | Prefer switch over is-chain if for type checks |
unnecessary_unawaited | Flag unawaited() calls where the future is already non-async |
Records for composite returns instead of one-off data classes..value) when the context type is unambiguous — reduces enum and static verbosity.?element in collection literals instead of if (x != null) x — cleaner and more idiomatic (Dart 3.8+).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.