effective-dart

Featured

Use when writing Dart code, reviewing for style, refactoring naming, adding doc comments, structuring imports, or enforcing type annotations.

AI & Automation 619 stars 60 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
93
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Effective Dart Skill This skill defines how to write idiomatic, high-quality Dart and Flutter code following Effective Dart guidelines. --- ## 1. Naming Conventions | Kind | Convention | Example | |---|---|---| | Classes, enums, typedefs, type parameters, extensions | `UpperCamelCase` | `MyWidget`, `UserState` | | Packages, directories, source files | `lowercase_with_underscores` | `user_profile.dart` | | Import prefixes | `lowercase_with_underscores` | `import '...' as my_prefix;` | | Variables, parameters, named parameters, functions | `lowerCamelCase` | `userName`, `fetchData()` | - Capitalize acronyms and abbreviations longer than two letters like words: `HttpRequest`, not `HTTPRequest`. - Avoid abbreviations unless the abbreviation is more common than the full term. - Prefer putting the **most descriptive noun last** in names. - Use terms **consistently** throughout your code. - Follow mnemonic conventions for type parameters: `E` (element), `K`/`V` (key/value), `T`/`S`/`U` (generic types). - Consider making code **read like a sentence** when designing APIs. - Prefer a **noun phrase** for non-boolean properties or variables. - Prefer a **non-imperative verb phrase** for boolean properties or variables; prefer the positive form. - Consider omitting the verb for named boolean parameters. - Avoid starting a function or method name with `get`; prefer removing `get` and using a getter when the API conceptually exposes a property. --- ## 2. Types and Functions - Use ...

Details

Author
evanca
Repository
evanca/flutter-ai-rules
Created
1 years ago
Last Updated
today
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category