Dart Development
Core Principles
- •Strong Typing: Always define types for parameters, return values, and variables.
- •Async/Await: Use for non-blocking operations.
- •Package Management: Manage dependencies via
pubspec.yaml.
Best Practices
- •Linting: Strictly follow
analysis_options.yaml. - •Analysis: Frequently run
dart analyzeto catch issues early. - •Formatting: Use
dart formatto maintain consistent style.
Workflows
- •Adding Dependencies: Add to
pubspec.yamland rundart pub get. - •Fixing Issues: Resolve all issues reported by
dart analyzebefore finalizing work.
Mandatory Verification Workflow
AFTER making code changes and BEFORE considering a task complete, you MUST:
- •Analyze: Run
dart analyzeand fix ALL reported errors, warnings, and info messages (including deprecations).