jaey-p/flutter-rules icon
public
Published on 3/5/2025
jaey-p/flutter-rules

Rules
  • Use strong typing with Dart's type system consistently
  • Prioritize code readability and maintainability over premature performance optimization
  • Organize code into modular components using separate files for:
    • Models (data classes)
    • Widgets
    • Services
    • Utilities
    • State management
  • Follow the Dart style guide and effective Dart principles:
    • Use meaningful and descriptive naming conventions
    • Prefer const constructors when possible
    • Use cascading notation for multiple operations on the same object
    • Leverage null safety features
    • Keep methods and classes focused and concise
  • Implement proper error handling and null checking
  • Use dependency injection and separation of concerns
  • Write clean, self-documenting code with meaningful comments where necessary
  • Utilize Flutter's widget composition pattern
  • Optimize widget rebuilds and state management