cubit_generator 1.0.2 copy "cubit_generator: ^1.0.2" to clipboard
cubit_generator: ^1.0.2 copied to clipboard

A CLI application for generating Cubit files in Flutter projects.

Cubit Generator #

Pub Version License

Cubit Generator is a Flutter package designed to automate the creation of Cubit and state files, streamlining the development process for state management in Flutter applications. This tool provides a command-line interface (CLI) for generating Cubit classes and their associated states, ensuring consistency and reducing boilerplate code.

Features #

  • Automated File Generation: Quickly generate Cubit and state files with a single command.
  • Structured Directory Management: Organizes generated files into a cubits directory with subdirectories for each Cubit.
  • Seamless Integration: Includes part and part of directives for easier file management.
  • Customizable: Easily extend and modify generated code to fit your specific needs.

Installation #

dart pub global activate cubit_generator
copied to clipboard

Usage #

Navigate to your Flutter project's root directory and run:

cubit_generator --name YourCubitName
copied to clipboard

This will create a new Cubit in your project:

lib/
  cubits/
    your_cubit_name/
      your_cubit_name_cubit.dart
      your_cubit_name_state.dart
copied to clipboard
2
likes
140
points
94
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.11 - 2025.03.26

A CLI application for generating Cubit files in Flutter projects.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

args, flutter, path

More

Packages that depend on cubit_generator