What problem does it solve?
Flutter/Dart Best Practices helps teams build maintainable, high-quality cross-platform apps by standardizing UI composition, state management, and testing practices.
Core Features & Use Cases
- Widget composition and UI architecture: build UIs from small, reusable widgets; prefer const constructors; minimize StatefulWidgets to improve performance and testability.
- State management: recommend Riverpod for top-level providers and AsyncValue handling; support BLoC patterns where appropriate; enforce immutability.
- Platform channels and integration: guidelines for MethodChannel/EventChannel usage and preferring Pigeon to generate type-safe bindings; keep platform-specific logic minimal in the shared layer.
- Responsive layout: use MediaQuery and LayoutBuilder; define mobile/tablet/desktop breakpoints and adapt UI accordingly.
- Testing and quality: emphasize widget tests, mocks, golden tests, and CI coverage thresholds to ensure reliability.
Quick Start
Create a new Flutter project and apply these best practices to structure widgets, manage state, and test components from the start.