init_pro
init_pro is a command-line tool designed to simplify and speed up repetitive tasks in Flutter projects. With support for clean architecture and component generation, init_pro aims to enhance your development workflow.
Features
- Set up clean architecture folder structure (Data, Domain, and Presentation layers).
- Generate Flutter components such as buttons, text fields, dialogs, and more.
- Add commonly used utilities like validators, formatters, and others.
- Manage dependencies and ensure smooth project setup.
- +25 prebuilt Flutter components for faster development.
Installation
To use init_pro, add it to your Flutter project's dev dependencies:
flutter pub add dev:init_pro
Global activation
Run this command to activate the CLI tool:
dart pub run global activate init_pro
Or manually add it to your pubspec.yaml:
dev_dependencies:
init_pro: ^0.1.0
Then run this command
flutter pub get
Usage
Run init_pro commands in your Flutter project directory:
Commands
Initialize Clean Architecture
Sets up a clean architecture folder structure with data, domain, and presentation layers.
dart pub run init_pro init
Generate Feature
Generates a new feature with the three-layer architecture and required files.
dart pub run init_pro create-feature <feature-name>
Add Component
Generates a common Flutter component such as buttons, dialogs etc.
dart pub run init_pro add-component <component-name>
Show Help
Displays help and usage information.
dart pub run init_pro --help
Example Workflow
1. Initialize Project
Start by setting up the clean architecture for your Flutter project
dart pub run init_pro init
2. Add a New Feature
Generate a new feature folder with three-layer architecture:
dart pub run init_pro create-feature authentication
3. Generate a Reusable Component
Add a prebuilt and customizable Flutter component like a button or text field:
dart pub run init_pro add-component elevated-button
Contributing
We welcome contributions to init_pro! Please fork the repository and create a pull request for any new features or fixes.
- Fork the project.
- Create your feature branch (git checkout -b feature/new-feature).
- Commit your changes (git commit -m 'Add new feature').
- Push to the branch (git push origin feature/new-feature).
- Open a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
Libraries
- commands/add_component_command
- commands/add_dependencies
- commands/components/alert_dialog
- commands/components/animated_container
- commands/components/badge
- commands/components/bottom_sheet
- commands/components/card
- commands/components/checkbox
- commands/components/chip
- commands/components/circle_avatar
- commands/components/circular_progress_indicator
- commands/components/custom_app_bar
- commands/components/custom_scroll_view
- commands/components/custom_text_field
- commands/components/custom_toast
- commands/components/fade_transition
- commands/components/grid_tile
- commands/components/grid_view
- commands/components/hero
- commands/components/linear_progress_indicator
- commands/components/list_tile
- commands/components/list_view
- commands/components/scale_transition
- commands/components/search_field
- commands/components/shimmer_widget
- commands/components/slider
- commands/components/tab_bar
- commands/create_feature_command
- commands/init_command
- init_pro
- utils/dirs_repository
- utils/file_creator