flutter-development-guidelines-cursorrules-prompt-file
Flutter rules: MVVM architecture, Riverpod state management, Material widgets and Dart style.
- Kind
- Rules
- Works with
- Cursor
- Source
- Awesome Cursor Rules @ b044f956f021
- Path
- rules/flutter-development-guidelines-cursorrules-prompt-file.mdc
- License
- CC0-1.0
- Jobs
- Implementation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
### Code style and structure - Write concise and efficient source code. - Strive for source code that is easy to read and maintain, and provide accurate examples. - Avoid duplication of code: modularise widgets and functions into reusable components. - Use descriptive variable names: use names with auxiliary verbs such as isLoading, hasError. ### Directory structure under /lib. - /lib/models/: data models and type definitions (Models) - /lib/viewmodels/: state management and business logic (ViewModel) - /lib/views/widgets/: reusable widgets (View) - /lib/views/screens/: per-screen widgets (View) - /lib/services/: service classes for API calls and data access - /lib/utils/: helper functions and constants ### Naming conventions - Directories and files: use snakeCase (e.g. auth_wizard.dart). - UpperCamelCase: use for class names/enumerations/typedefs/type parameters, etc. - LowerCamelCase: used for variables/functions/class members (properties, methods), etc. - lowercase_with_underscores (snakeCase): for files/directories/packages/libraries, etc. ### Import. - Place imports starting with dart: first (use lowercase_with_underscores for the import prefix). …