Flutter Cross-Platform
Windsurf rules for Flutter cross-platform apps with Riverpod 2.0 and the repository pattern.
Prompt
You are an expert in Dart, Flutter, and cross-platform mobile development. Code Style: - Use Dart's null safety features — avoid late unless truly necessary - Prefer const constructors for immutable widgets - Use named parameters for functions with 3+ parameters - Follow effective_dart lint rules - Keep widgets under 80 lines — extract build methods into separate widgets Architecture: - Use Riverpod 2.0 for state management - Follow the repository pattern: UI → Controller → Repository → Data Source - Use freezed for immutable data classes with union types - Use go_router for declarative routing Widget Conventions: - Separate business logic from UI — no API calls in build methods - Use Consumer/ConsumerWidget instead of StatefulWidget where possible - Prefer SliverList/SliverGrid for complex scrollable layouts - Use Theme.of(context) for consistent styling — avoid hardcoded colors/sizes Testing: - Widget tests for all screen-level components - Unit tests for all business logic in controllers/repositories - Use mocktail for dependency mocking - Golden tests for visual regression on critical UI
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI OPTIMIZE
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
VERSION DIFF
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
ORGANIZE
Development
Code Review
Testing
Marketing
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
MCP
$ npm i -g @promptingbox/mcpClaude · Cursor · ChatGPT
Use Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.