flutter_blueprint 0.2.0-dev.2 copy "flutter_blueprint: ^0.2.0-dev.2" to clipboard
flutter_blueprint: ^0.2.0-dev.2 copied to clipboard

Smart Flutter app scaffolding CLI with architecture, theming, routing, and environment handling built-in.

0.3.0-dev.1 (Current) #

๐Ÿ”ฅ NEW: Incremental Feature Generation - The Killer Feature! #

What's New:

  • โœ… add feature command - Generate features incrementally in existing projects
  • โœ… Smart state management detection - Automatically generates Provider/Riverpod/Bloc files based on blueprint.yaml
  • โœ… Clean architecture scaffolding - Creates data/domain/presentation layers
  • โœ… Automatic router integration - Injects routes into app_router.dart
  • โœ… Selective layer generation - Choose which layers to generate with flags
  • โœ… API integration support - Include remote data sources with --api
  • โœ… Router skip option - Use --no-router to skip automatic router updates

Usage:

# Full feature with all layers
flutter_blueprint add feature auth

# Only presentation layer
flutter_blueprint add feature settings --presentation --no-data --no-domain

# With API integration
flutter_blueprint add feature products --api

# Skip router update
flutter_blueprint add feature profile --no-router

Generated Structure (example: auth):

lib/features/auth/
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ models/auth_model.dart
โ”‚   โ”œโ”€โ”€ datasources/
โ”‚   โ”‚   โ”œโ”€โ”€ auth_remote_data_source.dart  # if --api
โ”‚   โ”‚   โ””โ”€โ”€ auth_local_data_source.dart
โ”‚   โ””โ”€โ”€ repositories/auth_repository_impl.dart
โ”œโ”€โ”€ domain/
โ”‚   โ”œโ”€โ”€ entities/auth_entity.dart
โ”‚   โ”œโ”€โ”€ repositories/auth_repository.dart
โ”‚   โ””โ”€โ”€ usecases/
โ”‚       โ”œโ”€โ”€ get_auth_list.dart
โ”‚       โ”œโ”€โ”€ get_auth_by_id.dart
โ”‚       โ”œโ”€โ”€ create_auth.dart
โ”‚       โ”œโ”€โ”€ update_auth.dart
โ”‚       โ””โ”€โ”€ delete_auth.dart
โ””โ”€โ”€ presentation/
    โ”œโ”€โ”€ pages/auth_page.dart
    โ”œโ”€โ”€ widgets/auth_list_item.dart
    โ””โ”€โ”€ [provider|riverpod|bloc]/  # Adapts to project's state management

State Management Adaptation:

Project Type Generated Files
Provider feature_provider.dart (ChangeNotifier)
Riverpod feature_provider.dart (StateNotifier + sealed states)
Bloc feature_event.dart, feature_state.dart, feature_bloc.dart

Flags:

  • --data / --no-data - Generate/skip data layer
  • --domain / --no-domain - Generate/skip domain layer
  • --presentation / --no-presentation - Generate/skip presentation layer
  • --api - Include remote data source (Dio-based)
  • --router / --no-router - Update/skip app_router.dart modification

Impact:

  • 10-20x faster feature development
  • Perfect consistency across all features
  • Zero boilerplate - one command does everything
  • Production-ready code generation

Validation:

  • โœ… Tested with Provider, Riverpod, and Bloc templates
  • โœ… Automatic router update working
  • โœ… Generated 13-15 files per feature
  • โœ… Clean architecture maintained

0.2.0-dev.3 #

๐Ÿš€ NEW: Multi-Template State Management Support #

What's New:

  • โœ… Riverpod Template - Compile-time safe state management
  • โœ… Multi-template architecture (Provider + Riverpod, Bloc coming soon)
  • โœ… Template selection via --state flag
  • โœ… All templates share professional core modules

Riverpod-Specific Features:

  • ProviderScope wrapper in main.dart for dependency injection
  • ConsumerWidget pattern for reactive UI
  • StateNotifier with immutable state classes and copyWith()
  • Global providers in core/providers/app_providers.dart
  • Compile-time safety - catch errors before runtime
  • Better testability - providers easily mocked with ProviderContainer
  • Automatic disposal - no memory leaks

Usage:

# Generate Riverpod project
flutter_blueprint init my_app --state riverpod --theme --api

# Or use wizard (select Riverpod from menu)
flutter_blueprint init

Template Comparison:

Feature Provider Riverpod
State Class ChangeNotifier StateNotifier
UI Widget Consumer ConsumerWidget + WidgetRef
State Updates notifyListeners() state = state.copyWith(...)
Dependency Injection MultiProvider wrapper ProviderScope + ref.watch()
Compile-Time Safety โŒ โœ…
Generated Files 43 files 42 files

Dependencies:

  • flutter_riverpod: ^2.5.1 - Riverpod state management

Validation:

  • โœ… Generated 42 files with professional architecture
  • โœ… 0 analyzer errors
  • โœ… 9/9 tests passing
  • โœ… Same core modules as Provider (API, Logger, Storage, Validators, etc.)

What's Next: Bloc template coming soon!


0.2.0-dev.2 #

โœจ NEW: Interactive Wizard Mode #

Beautiful CLI Experience:

  • โœ… Guided step-by-step project setup
  • โœ… Arrow key navigation for state management selection
  • โœ… Multi-select checkboxes for features (spacebar to toggle)
  • โœ… Configuration preview before generation
  • โœ… Smart validation (prevents Dart reserved words)
  • โœ… Package name validation (lowercase with underscores)
  • โœ… Emoji-rich, colorful UI powered by interact package

Usage:

# Launch wizard
flutter_blueprint init

# Or use quick mode
flutter_blueprint init my_app --state provider

Dependencies Added:

  • interact: ^2.2.0 - Beautiful CLI interactions

0.2.0-dev.1 #

๐Ÿš€ MAJOR UPGRADE: Enterprise-Grade Professional Template #

BREAKING: Generated projects now include 43 files (up from 19) with production-ready patterns.

๐Ÿ†• New Professional Modules

Error Handling System ๐Ÿšจ

  • โœ… 9 custom exception classes (FetchDataException, UnauthorizedException, etc.)
  • โœ… Clean architecture Failures with Equatable
  • โœ… Type-safe error handling throughout

Production API Client ๐ŸŒ

  • โœ… Enhanced Dio client with generic methods (GET/POST/PUT/DELETE)
  • โœ… AuthInterceptor - auto-add JWT tokens
  • โœ… RetryInterceptor - exponential backoff retry logic
  • โœ… Enhanced LoggerInterceptor with structured logging
  • โœ… ApiResponse

Professional Logger ๐Ÿ“

  • โœ… AppLogger with 5 levels (debug/info/warning/error/success)
  • โœ… Tag-based filtering for modules
  • โœ… Emoji-prefixed output for better readability
  • โœ… Stack trace support for errors

Storage Layers ๐Ÿ’พ

  • โœ… LocalStorage - SharedPreferences wrapper with type safety
  • โœ… SecureStorage - FlutterSecureStorage wrapper for tokens
  • โœ… Singleton pattern implementation
  • โœ… Built-in error handling and logging

Form Validators โœ…

  • โœ… 7 production-ready validators (email, password, phone, required, minLength, maxLength, numeric)
  • โœ… Consistent error messages
  • โœ… 8 unit tests with 100% coverage
  • โœ… Easy to extend for custom validators

Reusable Widget Library ๐Ÿงฉ

  • โœ… LoadingIndicator - customizable loading spinner
  • โœ… ErrorView - error display with retry button
  • โœ… EmptyState - empty list placeholders
  • โœ… CustomButton - button with loading state
  • โœ… CustomTextField - styled text field with validators

Extension Methods ๐Ÿ”ง

  • โœ… String extensions (capitalize, isValidEmail, isBlank, removeWhitespace)
  • โœ… DateTime extensions (formattedDate, isToday, isYesterday)
  • โœ… BuildContext extensions (theme, colors, width, showSnackBar)

Constants & Configuration ๐Ÿ“‹

  • โœ… AppConstants - timeouts, storage keys, pagination defaults
  • โœ… ApiEndpoints - centralized API route management
  • โœ… RouteNames - route constants
  • โœ… AppColors - custom color palette

Network Monitoring ๐Ÿ“ก

  • โœ… NetworkInfo - connectivity status checks
  • โœ… Real-time connectivity stream
  • โœ… Works on all platforms

Enhanced State Management ๐ŸŽฏ

  • โœ… Professional Provider patterns with loading/error states
  • โœ… Separated UI components (pages/widgets/providers)
  • โœ… Consumer pattern with proper state handling
  • โœ… Example feature with best practices

Test Infrastructure ๐Ÿงช

  • โœ… Validator unit tests (8 tests, all passing)
  • โœ… Test helpers for widget testing
  • โœ… MockTail integration for testing
  • โœ… CI/CD ready structure

๐Ÿ“ฆ New Dependencies

  • shared_preferences: ^2.2.3 - Local storage
  • flutter_secure_storage: ^9.2.2 - Secure token storage
  • equatable: ^2.0.5 - Value comparison for Failures
  • connectivity_plus: ^6.0.5 - Network monitoring
  • pretty_dio_logger: ^1.4.0 - API logging

๐Ÿ“ˆ Metrics

  • Generated Files: 19 โ†’ 43 (+126%)
  • Core Modules: 5 โ†’ 10 (+100%)
  • Reusable Widgets: 0 โ†’ 5
  • API Interceptors: 1 โ†’ 3 (+200%)
  • Lines of Code: ~800 โ†’ ~2,500+ (+200%)
  • Analyzer Errors: 0
  • Test Coverage: 100% (validators)

๐Ÿ’ก Impact

For Developers:

  • Save 2-3 days of boilerplate setup
  • Professional patterns from day one
  • Focus on features, not infrastructure

For Teams:

  • Consistent codebase across projects
  • Reduced onboarding time
  • Faster MVP delivery

For Enterprises:

  • Enterprise-grade architecture
  • Security patterns included
  • Logging and monitoring ready
  • Scalable structure

0.1.0-dev.1 #

Initial Development Release #

Core Features:

  • โœ… CLI-based project generation with flutter_blueprint init
  • โœ… Interactive and flag-based configuration modes
  • โœ… Provider state management template (mobile platform)
  • โœ… Modular architecture with core/features folder structure
  • โœ… Optional theme scaffolding (light/dark mode support)
  • โœ… Optional localization setup (ARB files + intl)
  • โœ… Optional environment configuration (.env support)
  • โœ… Optional API client setup (Dio + interceptors)
  • โœ… Optional test scaffolding (widget tests + mocktail)
  • โœ… Auto-routing system with route guards
  • โœ… Blueprint manifest (blueprint.yaml) for project tracking

Template Structure:

  • Clean architecture with core/, features/, and app/ layers
  • Type-safe configuration management
  • Production-ready folder organization
  • Best-practice imports and dependency injection

What's Next:

  • Riverpod and Bloc templates
  • Feature generation command (flutter_blueprint add feature)
  • Web and desktop platform support
  • Plugin system for optional modules
  • CI/CD scaffold generation
5
likes
0
points
208
downloads

Publisher

unverified uploader

Weekly Downloads

Smart Flutter app scaffolding CLI with architecture, theming, routing, and environment handling built-in.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, interact, mustache_template, path, yaml

More

Packages that depend on flutter_blueprint