A production-ready VS Code extension for Flutter developers that provides Clean Architecture generators and code templates.
Features
🏗️ Clean Architecture Generator
Generate a complete Clean Architecture folder structure for your Flutter features:
lib/
├── core/
├── features/
│ └── <feature_name>/
│ ├── data/
│ │ ├── datasources/
│ │ ├── models/
│ │ └── repositories/
│ ├── domain/
│ │ ├── entities/
│ │ ├── repositories/
│ │ └── usecases/
│ └── presentation/
│ ├── providers/ (or bloc/)
│ ├── screens/
│ └── widgets/
📱 Code Generators
1. Screen Generator
Generates Flutter screens with proper state management integration:
- Riverpod (Consumer widget)
- Bloc (BlocBuilder)
- Provider (Consumer widget)
2. ViewModel/Controller Generator
Generates state management code based on your choice:
- Riverpod: StateNotifier with StateNotifierProvider
- Bloc: Bloc with Events and States
- Provider: ChangeNotifier with Provider
3. Riverpod Provider Generator
Generates standalone Riverpod providers with:
- StateNotifier implementation
- State management
- Error handling
4. Data Model Generator
Generates Dart models with:
- Null-safe properties
fromJson / toJson methods
copyWith method
- Equality comparison
toString override
Usage
Command Palette
- Press
Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
- Type "Save Points" to see all available commands
- Select the command you want to use
Right-click on any folder in the lib/ directory to access commands via context menu.
Commands
Generate Clean Architecture Structure
- Run command:
Save Points: Generate Clean Architecture Structure
- Enter feature name (e.g.,
authentication, user_profile)
- Select state management (Riverpod / Bloc / Provider)
- Structure will be created automatically
Generate Flutter Screen
- Run command:
Save Points: Generate Flutter Screen
- Enter feature name
- Enter screen name (e.g.,
login, home)
- Select state management
- Screen file will be generated and opened
Generate ViewModel/Controller
- Run command:
Save Points: Generate ViewModel/Controller
- Enter feature name
- Select state management
- ViewModel/Controller will be generated
Generate Riverpod Provider
- Run command:
Save Points: Generate Riverpod Provider
- Enter feature name
- Enter provider name
- Provider will be generated
Generate Data Model
- Run command:
Save Points: Generate Data Model
- Enter feature name
- Enter model name
- Choose location (Data Layer or Domain Layer)
- Model will be generated with JSON serialization
Requirements
- VS Code 1.74.0 or higher
- Flutter project with
pubspec.yaml in workspace root
- TypeScript 5.3.2 or higher (for development)
Extension Settings
This extension contributes the following settings:
- Commands are available via Command Palette
- Context menu integration for
lib/ directory
Activation
The extension only activates when:
- A Flutter project is detected (presence of
pubspec.yaml)
- VS Code workspace is opened
Generated Code Features
All generated code follows:
- ✅ Flutter lint rules
- ✅ Null-safety
- ✅ Dart naming conventions
- ✅ Best practices
- ✅ Clean Architecture principles
- ✅ SOLID principles
Project Structure
src/
├── commands/ # Command handlers
├── generators/ # Code generators
├── utils/ # Utility functions
└── extension.ts # Extension entry point
Development
Building
npm install
npm run compile
Testing
npm test
Packaging
npm run vscode:prepublish
vsce package
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and feature requests, please use the GitHub Issues page.
save-points-vscode-extension-for-flutter