Skip to main content

flab 1.0.4 copy "flab: ^1.0.4" to clipboard
flab: ^1.0.4 copied to clipboard

A CLI tool to scaffold Flutter projects with Clean Architecture, MVVM, MVC, and custom themes.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.4 - 2026-09-05 #

  • Fixed Clean Architecture state-management scaffolding so GetX uses the manager controller without generating a duplicate state controller.
  • Prevented non-GetX Clean Architecture features from registering or importing a GetX controller.
  • Kept Provider, Riverpod, and Bloc starter state files available when selected.
  • Added tests covering the GetX controller generation behavior.

1.0.3 - 2026-09-05 #

  • Fixed data and domain boilerplates, including UseCase templates.
  • Fixed MVC and MVVM feature structures.
  • Added state-management selection for Clean Architecture, MVC, and MVVM.
  • Updated CLI command prompt and state-management dependencies.
  • Updated package and CLI version to 1.0.3.

1.0.2 #

  • Fixed unused imports in example.dart.
  • Updated core dependencies to the latest versions.
  • Fixed widget_test.dart initialization errors.

1.0.1 - 2026-09-04 #

Added #

  • Created official example/example.dart usage guide to fulfill pub.dev publication requirements and achieve a full package score.

Fixed #

  • Updated core dependencies (args, mason_logger, path, io, cli_dialog) to their latest stable versions in pubspec.yaml to address pub.dev package constraint warnings.
  • Fixed widget_test.dart import error by dynamically referencing app.dart based on the initialized project name.

1.0.0 - 2024-09-04 #

Added #

  • Project Initialization (flab init):

    • Full Flutter application bootstrapping with a single command (flab init <appName>).
    • Interactive project naming and validation if executed without arguments.
    • In-place project initialization when executed inside an existing Flutter workspace.
    • Automatic installation of essential industry-standard dependencies (dio, hive, hive_flutter, get_it, go_router, google_fonts, connectivity_plus, pretty_dio_logger, flutter_screenutil).
    • Automatic physical asset folder creation (assets/animations, assets/icons, assets/images).
    • Automatic test/widget_test.dart synchronization with the generated app.dart root.
  • Multi-Architecture Feature Generator:

    • Clean Architecture feature generator (flab <Feature> --clean):
      • Data Layer: Remote/Local Data Sources, Models with JSON serialization, Repository implementations.
      • Domain Layer: Abstract Repositories, UseCases.
      • Presentation Layer: Responsive views/screens and feature controllers.
    • MVVM Architecture scaffolding (flab <Feature> --mvvm).
    • MVC Architecture scaffolding (flab <Feature> --mvc).
    • Granular component scaffolding:
      • Dedicated UseCase injection via -u, --usecase <UseCaseName>.
      • Model & Entity generation via -m, --model <ModelName>.
  • Automated Dependency Injection:

    • Auto-registration of Data Sources, Repositories, UseCases, and Controllers directly into lib/injection.dart using GetIt.
    • Automatic clean-up of DI registrations when features are removed.
    • Automatic update of DI bindings when features are renamed.
  • Feature Lifecycle Management:

    • flab list: Lists all active features in lib/features/.
    • flab rm <Feature>: Safely deletes feature folder, corresponding test folder, and cleans up DI bindings.
    • flab rename <Old> <New>: Safely renames feature directories, test paths, and updates DI registrations.
  • Modular Configuration Subcommands (flab config):

    • flab config theme: Injects comprehensive theme system (UAppTheme, UTextTheme), color constants (UColors), size tokens (USizes), device helpers (UDeviceHelper), BuildContext extensions, and modular widget themes (AppBar, BottomSheet, Checkbox, Chip, Buttons, TextField).
    • flab config assets: Creates physical asset directories.
    • flab config backend: Injects DioClient (with interceptors and PrettyDioLogger), NetworkInfo, Hive StorageService, and base injection.dart.
    • flab config utils: Injects ApiEndpoints and AppLogger.
    • flab config main: Injects clean main.dart and responsive app.dart integrated with ScreenUtilInit and GoRouter.
  • Maintenance & Developer Utilities:

    • flab clean pubspec: Strips default comment clutter from pubspec.yaml, automatically adds asset folders, and formats the flutter: block.
    • flab doctor / flab health: Diagnostic utility to verify if current directory is a valid Flutter project.
    • flab tree: Visual ASCII tree generator for lib/ directory structure.
    • flab --help / flab -h: Interactive help guide and styled ASCII art banner.
    • flab --version / flab -v: Version information output.

Changed #

  • Standardized CLI command name and binary executable to flab.
5
likes
160
points
174
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A CLI tool to scaffold Flutter projects with Clean Architecture, MVVM, MVC, and custom themes.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, cli_dialog, io, mason_logger, path

More

Packages that depend on flab