A production-ready VS Code extension for Flutter developers that provides Clean Architecture generators and code templates.
🚀 Quick Start
- Install the extension from VS Code Marketplace
- Open your Flutter project
- Press
Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
- Type "Save Points" and select any generator
- Follow the prompts to generate production-ready code!
📖 Documentation:
✨ Key Features
- 🏗️ Complete Architecture Generator - Generate full Clean Architecture structure with starter files
- 📱 12 Code Generators - Screens, Widgets, Services, Use Cases, ViewModels, Providers, Models, Project Structure, Repository, Bloc, Riverpod, Flutter App
- 🎨 3 State Management Options - Riverpod, Bloc, and Provider support
- 🚀 Production-Ready Templates - Loading states, error handling, empty states
- ✅ Best Practices - Null-safe, SOLID principles, Clean Architecture
- 📦 Individual Component Commands - Generate Repository, Bloc, or Riverpod separately with organized file structure
Features
🏗️ Clean Architecture Generator ⭐ Enhanced
Generate a complete Clean Architecture folder structure with starter files for your Flutter features:
lib/
├── core/
│ └── widgets/ # Shared widgets
├── features/
│ └── <feature_name>/
│ ├── data/
│ │ ├── datasources/ # API & Local services
│ │ ├── models/ # Data models
│ │ └── repositories/ # Repository implementations
│ ├── domain/
│ │ ├── entities/ # Business entities
│ │ ├── repositories/ # Repository interfaces
│ │ └── usecases/ # Business logic
│ └── presentation/
│ ├── providers/ (or bloc/) # State management
│ ├── screens/ # UI screens
│ └── widgets/ # Feature widgets
Enhanced with interactive configuration:
- ✅ Feature Name: Enter your feature name (e.g., "post")
- ✅ State Management: Choose from Riverpod, Bloc, or Provider
- ✅ Operations Checklist: Select which operations to generate:
- Create (use case + screen)
- Update (use case + screen)
- Delete (use case)
- Fetch All (use case)
- Fetch By ID (use case)
- Filter (custom use case)
- ✅ Model Fields: Configure model with custom fields (name and data type)
- ✅ Conditional Generation: Only generates files for selected operations
- ✅ Custom Model: Model generated with your specified fields and types
Automatically generates:
- ✅ Entity file with business logic
- ✅ Repository interface and implementation
- ✅ Data model with your custom fields and JSON serialization
- ✅ ViewModel/Provider/Bloc based on state management
- ✅ Screen with loading, error, and empty states
- ✅ Use cases for selected operations only
- ✅ Data sources (remote and dummy)
📱 Code Generators
1. Screen Generator ⭐ Enhanced
Generates production-ready Flutter screens with:
- State Management Integration: Riverpod, Bloc, or Provider
- Loading States: CircularProgressIndicator with proper UX
- Error States: Error display with retry functionality
- Empty States: User-friendly empty state handling
- Success States: Structured content layout
- Best Practices: Null-safe, clean widget structure
Generate reusable Flutter widgets with 8 different types:
- Multi-Select Checklist: Select multiple widget types to generate at once
- Stateless Widget: Simple reusable components
- Stateful Widget: Widgets with internal state
- Consumer Widget: Riverpod consumer widgets
- Form Widget: Forms with validation
- List Widget: ListView with item builder
- Card Widget: Material card components
- Button Widget: Customizable buttons with loading states
- Input Widget: Text inputs with validation
- Batch Generation: Generate multiple widget types in one operation
3. Service/Repository Generator 🆕
Generate data layer services with 4 types:
- Repository: Complete repository implementation with caching
- Data Source Interface: Abstract data source contracts
- API Service: HTTP API service with error handling
- Local Service: SharedPreferences caching service
4. Use Case Generator 🆕
Generate domain layer use cases with 6 types:
- Get List: Fetch list of entities
- Get By ID: Fetch single entity
- Create: Create new entity
- Update: Update existing entity
- Delete: Delete entity
- Custom: Custom business logic use case
5. 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
6. Riverpod Provider Generator
Generates standalone Riverpod providers with:
- StateNotifier implementation
- State management
- Error handling
7. Data Model Generator
Generates Dart models with:
- Null-safe properties
fromJson / toJson methods
copyWith method
- Equality comparison
toString override
8. Project Structure Generator 🆕
Generates complete Flutter project foundation with:
- Core Folder: Constants, theme, localization, utils, widgets, services, network
- Network Infrastructure: API client, interceptors, error handlers, endpoints
- Config Folder: Environment configurations and dependency injection
- Shared Folder: Structure for reusable components
- 25+ Essential Files: Ready-to-use core files following best practices
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.,
post, user_profile)
- Select state management (Riverpod / Bloc / Provider)
- Select operations from checklist:
- Create, Update, Delete
- Fetch All, Fetch By ID, Filter
- Configure model fields:
- Add field name and data type
- Support for common types (String, int, double, bool, DateTime, List, Map)
- Custom types supported
- Add multiple fields as needed
- Complete structure with starter files will be created automatically:
- All folders and subfolders
- Entity, Repository Interface, Model (with your custom fields)
- ViewModel/Provider/Bloc
- Screen with state handling
- Use cases for selected operations only
- Create/Update screens (if selected)
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
- Run command:
Save Points: Generate Reusable Widget
- Enter widget name
- Select widget types (use space to select multiple): Stateless, Stateful, Consumer, Form, List, Card, Button, Input
- Choose if widget belongs to a feature or is shared/common
- All selected widget types will be generated in one operation
- When multiple types selected, files are named with type suffix (e.g.,
button_stateless_widget.dart, button_stateful_widget.dart)
Generate Service/Repository 🆕
- Run command:
Save Points: Generate Service/Repository
- Enter feature name
- Select service type (Repository, Data Source, API Service, Local Service)
- Enter service name
- Service will be generated with proper structure
Generate Use Case 🆕
- Run command:
Save Points: Generate Use Case
- Enter feature name
- Select use case type (Get List, Get By ID, Create, Update, Delete, Custom)
- Enter use case name
- Use case will be generated with business logic encapsulation
Generate Project Structure 🆕
- Run command:
Save Points: Generate Project Structure
- Choose which sections to generate (Core, Config, Shared)
- Select default environment (dev, staging, prod)
- Complete project foundation will be created automatically:
- Core folder with constants, theme, localization, utils, widgets, services, network
- Network infrastructure (API client, interceptors, error handlers, endpoints)
- Config folder with environment configs and dependency injection
- Shared folder structure
- 25+ essential files ready to use
Generate Repository 🆕
- Run command:
Save Points: Repository
- Enter feature name
- Select operations to include (Fetch All, Fetch By ID, Create, Update, Delete, Filter)
- Repository interface and implementation will be generated in separate files:
- Domain layer:
{feature}_repository.dart (interface)
- Data layer:
{feature}_repository_impl.dart (implementation)
Generate Bloc 🆕
- Run command:
Save Points: Bloc
- Enter feature name
- Bloc will be generated in 3 separate files:
{feature}_event.dart - All event classes
{feature}_state.dart - All state classes
{feature}_bloc.dart - Bloc implementation
Generate Riverpod 🆕
- Run command:
Save Points: Riverpod
- Enter feature name
- Riverpod provider will be generated in 2 separate files:
{feature}_state.dart - State class with copyWith method
{feature}_notifier.dart - Notifier and provider
Generate Flutter App Structure 🆕
- Run command:
Save Points: Flutter App Structure
- Complete Flutter app foundation will be created automatically:
- Core Folder: widgets, utils, helpers, extensions, constants, theme
- Screens: splash_screen.dart, home_screen.dart
- Main App: main.dart with routing setup
- 18+ Files: Ready-to-use app structure with best practices
What's New in v1.16.1 🎉
- 🐛 Bug Fixes: Fixed theme generator issues and const constructor errors
- Fixed SystemUiOverlayStyle missing import in dark theme generator
- Fixed CardTheme to CardThemeData type mismatch
- Fixed const constructor issues in CardThemeData
- 🏗️ Code Organization: Major refactoring of Flutter App Generator
- Separated into focused modules: widgets, helpers, network consumers, screens
- Reduced main file from 1125+ lines to ~266 lines
- Each generator now in its own file for better maintainability
- 📁 Extension Separation: Extensions now generated in separate files
- String extensions →
string_extensions.dart
- DateTime extensions →
datetime_extensions.dart
- BuildContext extensions →
buildcontext_extensions.dart
- ✨ Improved Code Quality: Better separation of concerns and type safety
What's New in v1.16.0 🎉
- 🎯 Individual Component Commands: New dedicated commands for generating individual components
- Repository Command: Generate repository interface and implementation separately with operations selection
- Bloc Command: Generate Bloc in 3 separate files (events, states, bloc) for better organization
- Riverpod Command: Generate Riverpod provider in 2 separate files (state, notifier) for better organization
- 🚀 Flutter App Structure Command: Generate complete Flutter app foundation in one command
- Core folder with widgets, utils, helpers, extensions, constants, theme
- Screens folder with splash and home screens
- Main app file with routing setup
- 18+ files ready to use
- ✨ Better File Organization: Bloc and Riverpod files are now generated in separate files following best practices
- 🎨 Improved Developer Experience: More granular control over code generation with individual component commands
What's New in v1.15.0 🎉
- 📁 Better Screen Organization: When generating multiple common screens, each screen is now placed in its own folder
- Single screen: Generated directly in target directory
- Multiple screens: Each screen gets its own folder (e.g.,
splash/, sign_in/, profile/)
- All related files (services, utils) are kept with their respective screen
- 🐛 Bug Fix: Fixed "index is not defined" error in common screen generation
- ✨ Improved Structure: Cleaner folder organization when generating multiple screens at once
What's New in v1.14.0 🎉
- ✅ Multi-Select Checklists: Generate multiple widgets or screens at once!
- Widget Generator: Select multiple widget types (Stateless, Stateful, Consumer, Form, List, Card, Button, Input) and generate them all in one operation
- Common Screen Generator: Select multiple screen types (Splash, Onboarding, Sign In, Sign Up, etc.) and generate them all at once
- Batch Generation: Faster development workflow with bulk generation
- Smart Naming: Files automatically named with type suffix when multiple types are selected
- 🚀 Improved Efficiency: Generate multiple items in a single command instead of running commands multiple times
- ✨ Better UX: Clear multi-select interface with descriptions for each option
What's New in v1.13.0 🎉
- 🌐 Core Network Generators: New network infrastructure generators for Flutter applications:
- API Client Generator: Centralized HTTP client using Dio with interceptors and error handling
- API Interceptor Generator: Request/response interceptor for handling timeouts, auth errors, etc.
- API Error Handler Generator: Centralized error handling with user-friendly messages
- API Endpoints Generator: Type-safe API endpoint constants with helper methods
- All generators follow best practices and are production-ready
- ✨ Better Network Layer: Complete network infrastructure code generation
- 🚀 Faster Development: Generate network layer code instantly
What's New in v1.11.0 🎉
- 🎯 Enhanced Architecture Generator: Interactive configuration wizard for Clean Architecture structure:
- Operations Checklist: Select which operations to generate (Create, Update, Delete, Fetch All, Fetch By ID, Filter)
- Model Fields Configuration: Configure model with custom fields (name and data type)
- Conditional Generation: Only generates files for selected operations
- Custom Model Support: Generate models with your specified fields and types
- Better UX: Multi-step wizard guides you through configuration
- ✨ Improved Code Generation: More precise code generation based on your specific needs
- 🚀 Faster Development: Generate only what you need, reducing boilerplate code
What's New in v1.10.0 🎉
- 🏗️ Project Structure Generator: Generate complete Flutter project foundation with one command!
- Core folder with constants, theme, localization, utils, widgets, and services
- Config folder with environment configs and dependency injection
- Shared folder structure for reusable components
- 20+ core files generated automatically
- 🎨 Core Generators: New generators for app-wide functionality:
- Constants (colors, strings, assets, routes)
- Theme (light, dark, app theme)
- Localization (supported locales, locale keys)
- Utils (validators, date helpers, extensions)
- Core widgets (button, text field, loading, empty state)
- Core services (navigation, notification, storage)
- ⚙️ Config Generators: Environment configuration and dependency injection setup
What's New in v1.5.1 🎉
Bug Fixes
- ✅ Fixed Command Registration: Commands are now always available, even outside Flutter projects (they will show appropriate error messages when used in non-Flutter contexts)
What's New in v1.5.0 🎉
- 🎨 6 New Common Screens: Profile, Home/Dashboard, Search, Detail, Forgot Password, Change Password
- 📁 Organized Generators: Generators folder restructured into logical subfolders (core, screens, widgets, usecases, services)
- 📚 Comprehensive Documentation: Complete usage guide, quick reference, and real-world examples
- ✨ Improved Organization: Better code organization with barrel exports and clear folder structure
What's New in v1.2.0 🎉
- ✨ Enhanced Architecture Generator: Now generates complete starter files, not just folders!
- 🎨 Widget Generator: 8 different widget types for reusable components
- 🔧 Service/Repository Generator: Complete data layer services
- 🎯 Use Case Generator: Domain layer business logic encapsulation
- 🚀 Enhanced Screen Generator: Production-ready screens with loading, error, and empty states
- 📦 Multi-step Wizard UI: Better UX for complex code generation
Requirements
- VS Code 1.90.0 or higher
- Flutter project with
pubspec.yaml in workspace root
- TypeScript 5.6.0 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
| |