flutter_setup 1.0.1
flutter_setup: ^1.0.1 copied to clipboard
A reusable Flutter project scaffolding CLI tool.
flutter_setup #
A reusable, production-ready Flutter project scaffolding and code generation CLI tool.
flutter_setup eliminates the hours required to start a production Flutter app by scaffolding a complete project with modern architecture, network layers, theme modes, dependency injection, and state management in seconds.
๐ Complete Developer & Integration Guide #
Looking for full API references, architecture blueprints, platform permission setup, and troubleshooting tables?
๐ Read the Complete Developer & Integration Guide (DOCUMENTATION.md)
โก Quick Start #
1. Install globally #
dart pub global activate flutter_setup
2. Scaffold a new Flutter app #
flutter_setup create my_awesome_app
3. Run your application #
cd my_awesome_app
flutter run
โจ Key Features #
- Instant Production Setup: Scaffolds a complete Flutter project with
Dio,Riverpod,GoRouter,Freezed,SharedPreferences,FlutterSecureStorage,FlutterLocalNotifications,FirebaseMessaging, andPermissionHandler. - Feature & Component Generators: Add new feature modules or sub-components (
screen,model,repository,service) into existing Flutter apps on demand. - Automated Asset Registration: Automatically scans
assets/(preserving binary files), registers asset paths inpubspec.yaml, and generates a type-safelib/core/constants/assets.dartclass. - Centralized Dependency Injection: Organizes cross-cutting services into
lib/injection/providers.dartusing Riverpod. - Safety Rollback & Conflict Resolution: Automatically rolls back project creation on partial failure and interactively prompts on destination folder collisions.
- Multiple Templates: Includes production-ready
defaulttemplate and lightweightminimaltemplate.
๐ฆ Available CLI Commands #
| Command | Usage | Description |
|---|---|---|
create |
flutter_setup create [name] [-t template] [-f] |
Scaffolds a new Flutter project (interactive if name omitted) |
templates |
flutter_setup templates |
Lists all available starter templates |
info |
flutter_setup info <template_name> |
Shows details for a specific template |
feature |
flutter_setup feature <name> [-p path] |
Generates a full feature module skeleton inside an existing project |
screen |
flutter_setup screen <name> --feature=<name> |
Generates a single screen file in an existing feature |
model |
flutter_setup model <name> --feature=<name> |
Generates a single model file in an existing feature |
repository |
flutter_setup repository <name> --feature=<name> |
Generates a single repository file in an existing feature |
service |
flutter_setup service <name> --feature=<name> |
Generates a single service file in an existing feature |
version |
flutter_setup version |
Shows CLI version |
help |
flutter_setup help |
Prints usage and command options |
๐๏ธ Architecture (default template) #
lib/
โโโ app/ # Application shell configuration (router, theme, root App widget)
โโโ core/ # Infrastructure services (network, storage, notifications, permissions)
โโโ injection/ # Centralized DI container (lib/injection/providers.dart)
โโโ features/ # Feature domain modules
โ โโโ example/
โ โโโ models/ # Data models & Freezed schemas
โ โโโ providers/ # Riverpod state notifiers
โ โโโ repositories/ # Data mapping & error handling
โ โโโ screens/ # UI screens
โ โโโ services/ # Direct API client communication
โ โโโ widgets/ # Feature-specific UI components
โโโ main.dart # Minimal entry point initializing services & running App
๐งช Running Tests #
dart test
๐ License #
This project is licensed under the MIT License - see the LICENSE file for details.