flutter_pro_architect 2.2.7 copy "flutter_pro_architect: ^2.2.7" to clipboard
flutter_pro_architect: ^2.2.7 copied to clipboard

Production-ready Dart CLI that scaffolds Clean Architecture and BLoC feature modules for scalable Flutter apps.

flutter_pro_architect #

flutter_pro_architect is a production-ready Dart CLI package for Flutter teams that want fast, consistent Clean Architecture + BLoC scaffolding.

Package Description #

This package provides:

  • Dynamic feature scaffolding with create_bloc_<feature_name> commands.
  • A setup command for project bootstrap: flutter pub run flutter_pro_architect:setup.
  • Clean Architecture boundaries with BLoC presentation templates.
  • Safe generation behavior (existing features are never overwritten).

Installation #

dart pub global activate flutter_pro_architect

Or use directly in a project:

dart pub add --dev flutter_pro_architect

Quick Start #

Generate a feature module named user:

flutter_pro_architect create_bloc_user

Install necessary flutter packages:

dart run flutter_pro_architect setup

Bootstrap project structure (Android + iOS by default):

flutter pub run flutter_pro_architect:setup

Platform-specific setup options:

flutter pub run flutter_pro_architect:setup --android
flutter pub run flutter_pro_architect:setup --ios
flutter pub run flutter_pro_architect:setup --both

Platform Support #

Platform Supported
Android
iOS
Web
macOS
Linux
Windows

Installed Packages #

When you run the setup command, the following essential packages are automatically added to your pubspec.yaml, organized by category:

Category Packages
Icon hugeicons
Navigation go_router, path_provider
Toast cherry_toast, fluttertoast
Env flutter_dotenv
Local Storage flutter_secure_storage
Network dio, talker_dio_logger, retrofit, dio_cache_interceptor, synchronized
UI flutter_screenutil
App Config rename_app, change_app_package_name, flutter_launcher_icons, in_app_update, package_info_plus
Image cached_network_image, flutter_cache_manager
Date & Time intl
Logger logger
Utils photo_view, image_picker, file_picker, carousel_slider, url_launcher, pinput
Core dartz, flutter_bloc, equatable, get_it

Generated Structure (Example) #

For create_bloc_user:

lib/
 ├── core/
 │   ├── error/failure.dart
 │   └── usecase/usecase.dart
 └── features/
     └── user/
         ├── data/
         │   ├── datasources/user_remote_datasource.dart
         │   ├── models/user_model.dart
         │   └── repositories/user_repository_impl.dart
         ├── domain/
         │   ├── entities/user_entity.dart
         │   ├── repositories/user_repository.dart
         │   └── usecases/
         │       ├── get_users_usecase.dart
         │       ├── get_user_by_id_usecase.dart
         │       ├── create_user_usecase.dart
         │       ├── update_user_usecase.dart
         │       ├── patch_user_usecase.dart
         │       └── delete_user_usecase.dart
         ├── presentation/
         │   ├── bloc/
         │   │   ├── user_bloc.dart
         │   │   ├── user_event.dart
         │   │   └── user_state.dart
         │   ├── pages/user_page.dart
         │   └── widgets/user_card.dart
         └── user_injection.dart

Full API Reference #

API Type Purpose
FlutterProArchitectCli class Main CLI runner for create_bloc_<feature> command parsing and generation.
GenerationSummary class Immutable result model for generator output logs and status.
FeatureGenerator class Feature and core scaffold writer.
toSnakeCase function Converts raw names to snake_case.
toPascalCase function Converts raw names to PascalCase.
Templates class Produces all generated Dart file templates as strings.

Working Full Code Example #

import 'package:flutter_pro_architect/flutter_pro_architect.dart';

Future<void> main() async {
  final cli = FlutterProArchitectCli();

  final exitCode = await cli.run([
    'create_bloc_user',
    '--no-color',
  ]);

  if (exitCode != 0) {
    throw Exception('Generation failed with exit code: $exitCode');
  }

  final snake = toSnakeCase('UserProfile');
  final pascal = toPascalCase('user_profile');

  print('snake_case: $snake');
  print('PascalCase: $pascal');
}

Example #

An interactive, premium-designed demonstration and workbench application is provided in the example folder.

This workbench application showcases:

  • Interactive name conversions showing toSnakeCase and toPascalCase outputs in real time.
  • Template catalogs where you can select, inspect, and copy all templates generated by the Templates class.
  • Live file scaffolding using FeatureGenerator and GenerationSummary to safely write feature files in a sandboxed temp folder and explore them in an interactive file explorer.
  • Simulated CLI executions using FlutterProArchitectCli to run scaffolding terminal commands and inspect output streams.

For instructions on compiling and running this playroom application, refer to the Example Documentation.

Notes #

  • Non-GET use case/data source/repository/BLoC sections are generated as commented demo blocks.
  • Generated feature code expects app dependencies such as bloc, flutter_bloc, equatable, dartz, and get_it in the target Flutter app.

License #

MIT

4
likes
160
points
440
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Production-ready Dart CLI that scaffolds Clean Architecture and BLoC feature modules for scalable Flutter apps.

Repository (GitHub)
View/report issues

Topics

#flutter #clean-architecture #bloc

License

MIT (license)

Dependencies

args, path

More

Packages that depend on flutter_pro_architect