Flutter Feature Generator Pro
A VSCode extension to automatically generate new Flutter features with Riverpod following Clean Architecture patterns.
Features
- Automatically generates complete Flutter feature structure
- Follows Clean Architecture pattern with separated layers (data, domain, presentation, provider)
- Includes all necessary files for Riverpod, Freezed and Supabase
- Pre-configured templates for datasource, repository, entity, screen, controller and provider
- Auto-detects package name from pubspec.yaml
- Right-click context menu integration
How to use
- Right-click on any folder in the file explorer
- Select "New feature..." from the context menu
- Enter the feature name (e.g., "product", "user", "order")
- Enter the datasource implementation name (e.g., "supabase", "firebase", "api")
- The extension will automatically create the complete feature structure
Generated structure
For each feature, the following structure is created:
feature_name_example/
├── data/
│ ├── datasource/
│ │ ├── feature_name_datasource.dart
│ │ └── feature_name_[implementation]_datasource.dart
│ ├── mapper/
│ │ └── feature_name_mapper.dart
│ ├── remote/
│ │ └── feature_name_remote.dart
│ └── repository/
│ └── feature_name_repository.dart
├── domain/
│ └── feature_name/
│ └── feature_name_entity.dart
├── presentation/
│ └── feature_name_screen/
│ ├── controller/
│ │ ├── state/
│ │ │ └── feature_name_screen_state.dart
│ │ └── feature_name_screen_controller.dart
│ └── feature_name_screen.dart
└── provider/
└── get_feature_names/
└── get_feature_names_provider.dart
Requirements
- VSCode 1.74.0 or higher
- Flutter project with Riverpod configured
- Dependencies: riverpod_annotation, freezed_annotation, supabase_flutter
Installation
- Compile the extension:
npm run compile
- Install the extension in VSCode
- Restart VSCode
Notes
- The extension generates base templates that follow Clean Architecture
- All files are ready to be compiled with
dart run build_runner build
- Templates follow Clean Architecture naming conventions
| |