flutter_bloc_cli
A CLI tool for generating Flutter project structures and screens using BLoC architecture.
Installation
To use flutter_bloc_cli, you need to activate it globally using the following command:
dart pub global activate flutter_bloc_cli
Usage
BLoC
Initializing Project Structure
Initialize the structure of an existing project using the init
command:
bloc init
This command sets up the necessary directories and files for implementing BLoC architecture in your Flutter project.
Creating Screens
Generate screens (pages) for your application using the create screen
command:
bloc create screen <screen_name>
Replace <screen_name>
with the desired name of your screen. This command creates the necessary files for a new screen following the BLoC pattern.
You can also generate multiple screens at once using the create screens command:
bloc create screens first_screen second_screen third_screen
This command will create the necessary files for each screen specified, following the BLoC pattern.
Help
To display this help message, use the help command:
bloc help
Cubit
Initializing Project Structure
Initialize the structure of an existing project using the cubit init
command:
cubit init
This command sets up the necessary directories and files for implementing Cubit architecture in your Flutter project.
Creating Screens
Generate screens (pages) for your application using the cubit create screen
command:
cubit create screen <screen_name>
Replace <screen_name>
with the desired name of your screen. This command creates the necessary files for a new screen following the Cubit pattern.
You can also generate multiple screens at once using the create screens command:
cubit create screens first_screen second_screen third_screen
This command will create the necessary files for each screen specified, following the Cubit pattern.
Help
To display this help message, use the help command:
cubit help
Libraries
- commands/command
- commands/command_not_found
- commands/create_command/bloc_create_auth_screens_command
- commands/create_command/bloc_create_command
- commands/create_command/create_command
- commands/create_command/cubit_create_auth_screens_command
- commands/create_command/cubit_create_command
- commands/create_command/screen_creaters/bloc_blank_screen
- commands/create_command/screen_creaters/bloc_grid_screen
- commands/create_command/screen_creaters/bloc_listing_screen
- commands/create_command/screen_creaters/cubit_blank_screen
- commands/create_command/screen_creaters/cubit_grid_screen
- commands/create_command/screen_creaters/cubit_listing_screen
- commands/help_command/bloc_help_command
- commands/help_command/cubit_help_command
- commands/init_command/boc_init_command
- commands/init_command/cubit_init_command
- commands/invalid_command
- data/cli_data_provider
- data/constants
- enums/enums
- exception/cli_exception
- flutter_bloc_cli
- generators/create_auth_screens_generator
- generators/create_generartor
- generators/generator
- generators/init_generator
- utils/common
- utils/file_path_utils
- utils/pubspec_utils
- utils/string_extensions
- utils/strings
- validations/auth_screens_validations
- validations/create_validations
- validations/init_validations
- validations/validation_messages
- validations/validations