IDE Rule: Flutter Development Guidelines
IDE Rule: Flutter Development Guidelines is a verified IDE_RULE blueprint on Promptally in Framework IDE Rules optimized for leading AI models. Cursorrules_Mdc specification for IDE Rule: Flutter Development Guidelines. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | IDE RULE (Framework IDE Rules) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 606 |
| Source file | .cursorrules |
| Access tier | Free public (MIT) |
Pre-Filled Template
---
description: "Cursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines."
globs: **/*.dart
alwaysApply: false
---
### 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).
- Next, import third-party packages (package:).
- Finally, import relative paths and files in the project.
### Using Dart.
- Take advantage of type safety: use static typing in all code and utilise type inference wherever possible.
### UI and styling.
- Use Material widgets.
- Unify theming: use ThemeData to apply consistent styles.
### Performance optimisation.
- Prefer StatelessWidget when state is not required.
- Make use of const constructors: if widgets are immutable, use const to optimise builds.
### State management.
- Use riverpod to implement efficient state management.
- Manage state within the ViewModel and link it to the View.
### Software architecture
Use MVVM (Model View ViewModel).
### Key rules.
- To improve code readability, lines should not exceed 80 characters in length.
- Use braces {} for all flow control structures (if, for, while, etc.).
- Use comment-outs proactively to help understand and maintain code.
- Use single quotes, avoid the use of double quotes and use consistent string literals to improve readability.
How to use this ide rule
- Review the pre-filled example and source files above.
- Copy the template or download
.cursorrules, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use IDE Rule: Flutter Development Guidelines?
Open the ide rule on Promptally, review the pre-filled example, then copy the template or download .cursorrules and paste it into your model, IDE or workflow tool. IDE Rule: Flutter Development Guidelines is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is IDE Rule: Flutter Development Guidelines free?
Yes. IDE Rule: Flutter Development Guidelines is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does IDE Rule: Flutter Development Guidelines need?
IDE Rule: Flutter Development Guidelines is a static blueprint with no dynamic variables. Copy it and use it as-is.