clean-code

Installation
SKILL.md

Dart Coding Guidelines

  • Write concise, technical Dart code with accurate examples
  • Use functional and declarative programming patterns
  • Choose descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
  • Keep functions and classes short (< 200 lines, < 10 public methods)
  • Always use English for code and documentation
  • Use PascalCase for classes, camelCase for variables and functions, snake_case for files, UPPERCASE for constants
  • Use arrow syntax for simple methods and expression bodies for one-line getters/setters
  • Avoid nesting blocks; prefer early checks and returns
  • Pass and return parameters using RO-RO (Receive Object, Return Object)
  • Avoid magic numbers; use well-named constants
  • Follow an 100-character line limit and use trailing commas for better formatting
  • Follow the lint rules set for this project (all_lint_rules.yaml and analysis_options.yaml)
  • Strong Typing: Strictly prohibit dynamic. Use Object? or explicit types.
  • Cascade Pattern: Use cascade notation (..) for cleaner initialization of complex objects where appropriate.
  • Null Safety: Avoid ! null assertion operator unless value is guaranteed non-null by control flow. Prefer pattern matching.
  • Switch Expressions: Prefer exhaustive switch expressions (no break needed in Dart 3).
Installs
7
GitHub Stars
29
First Seen
Mar 1, 2026
clean-code — dhruvanbhalara/skills