flyer 🛠️
A powerful CLI package to speed up Flutter app development by automating repetitive tasks like creating features, pages, forms, and generating Dart model classes from JSON and and reformatting code and more. Additionally, it initializes your Flutter project's infrastructure and installs essential packages.
With flyer, you can streamline your development process, reduce boilerplate code, and focus
on building your app's core features.
Features 🚀
- Project Initialization: Set up the infrastructure of your Flutter project and install essential packages with Arabic and English localization by default.
- Feature Generation: Generate fully-structured Flutter features.
- Language Support: Add multiple languages to your app with ease.
- Model Generation: Generate Dart classes directly from JSON data.
- Page Generation: Add pages to specific features.
- Form Generation: Generate forms with custom fields.
- Deep Linking: Generate complete deep link system with automatic Android/iOS configuration.
- Watch Mode: Automatically monitor project files and regenerate code on changes.
- Code Formatting: Reformat your code for consistency.
- Unused Resources Finder: Identify and optionally delete unused assets, packages, and files.
Installation 📦
Add the following dependency to your pubspec.yaml:
dev_dependencies:
flyer: <latest version>
dart pub get
OR Run the following command to install:
dart pub add dev:flyer
Usage 📝
Init Command
The init command sets up the basic infrastructure for your Flutter project and installs essential
packages.
flyer init [OPTIONS]
Available Options
| Option | Description | Example Usage |
|---|---|---|
--lang |
Add languages during initialization. | --lang=en,ar,fr |
Example
flyer init --lang=en,ar,de
This command:
- Sets up the basic infrastructure for your Flutter project.
- Installs essential packages (e.g.,
app_features,flutter_bloc, etc.). - Automatically adds Arabic (
ar) and English (en) languages by default. - Automatically installs
request_inspectorpackage for API debugging. - Adds any additional languages specified with
--langoption. - Displays Messages and Dialogs and BottomSheet without context.
- Handle app responsive by use responsive_framework package.
- Initialize Call Api by use api_request package.
- Manage Routes by use go_router package.
Make Command
The make command allows you to create features, pages, models, forms, and manage languages for
your Flutter project.
flyer make [OPTIONS]
Available Options
| Option | Description | Example Usage |
|---|---|---|
--feature, -f |
Create a new feature. | --feature=myFeature |
--lang |
Add multiple languages to the app. | --lang=en,ar |
--model, -m |
Generate a Dart class from JSON. | --model=UserModel --json='{"name": "ahmed"}' |
--page |
Create a page within a feature. | --page=homePage --feature=myFeature |
--form |
Create a form with fields in a feature. | --form=login --fields=password,email |
Examples
Create a New Feature
flyer make --feature=account
Add Multiple Languages
flyer make --lang=en,fr,es
Generate a Dart Model from JSON Default Path app/models
flyer make --model=User --json='{"name": "John", "age": 30}'
Generate a Dart Model from JSON With Custom Path
flyer make --model=User --json='{"name": "John", "age": 30}' --path=custom_path
Generate a Page
flyer make --page=login --feature=account
Generate a Form
flyer make --form=login --feature=account --fields=email,password
Run Utility Tasks
The run command provides utility tasks like reformatting your project's code.
flyer run [OPTIONS]
Available Options
| Option | Description | Example Usage |
|---|---|---|
--format |
Reformat the project's code. | --format |
Example
To format your project's code:
flyer run --format
Watch Mode
The watch command monitors your Flutter project for file changes and automatically regenerates code or performs specified actions.
flyer watch
This command continuously watches your project files and triggers automatic rebuilds or code generation when changes are detected, improving development workflow efficiency.
Deep Linking
The deeplink command generates a complete deep linking system for your Flutter app, including automatic configuration for both Android and iOS platforms.
flyer deeplink
What It Does
- Creates
DeepLinkHandlerfor managing deep links - Creates
DeepLinkRoutesfor parsing URLs - Creates
DeepLinkConfigfor storing configuration - Automatically updates
AndroidManifest.xmlwith intent filters - Automatically updates iOS
Info.plistwith URL schemes - Adds initialization code to your app
Interactive Setup
When you run the command, you'll be prompted for:
- Scheme: Your app's custom URL scheme (e.g.,
myapp) - Host: Your domain or app identifier (e.g.,
example.com)
Example
flyer deeplink
# Enter scheme: myapp
# Enter host: shop.com
This creates deep links like:
myapp://shop.com/product/123myapp://shop.com/cartmyapp://shop.com/checkout
Testing Deep Links
Android:
adb shell am start -W -a android.intent.action.VIEW -d "myapp://shop.com/product/123"
iOS:
xcrun simctl openurl booted "myapp://shop.com/product/123"
Full Documentation
For complete setup instructions, testing, and advanced features (including Universal Links), see:
- DEEPLINK_GUIDE.md - Comprehensive deep linking documentation
Find Unused Resources
The fiend command helps you identify and optionally delete unused assets, packages, and files in
your Flutter project.
flyer fiend [OPTIONS]
Available Options
| Option | Description | Example Usage |
|---|---|---|
--unusedAssets |
Find unused assets in your project. | --unusedAssets |
--unusedPackages |
Find unused packages in your project. | --unusedPackages |
--unusedFiles |
Find unused files in your project. | --unusedPackages |
Example Usage
Find Unused Assets
flyer fiend --unusedAssets
Find Unused Packages
flyer fiend --unusedPackages
Find Unused Files
flyer fiend --unusedFiles
Contributing 🤝
Contributions are welcome! Here's how you can get involved:
- Fork the repository.
- Create a new branch (
feature/my-feature). - Commit your changes.
- Push to your branch.
- Open a pull request.
Feel free to file issues or feature requests on the GitHub repository.
License 📄
This project is licensed under the MIT License. See the LICENSE file for details.
Additional Information 📚
For more details, visit the official Dart documentation and Flutter CLI documentation.
Happy coding! 😊
Libraries
- commands/deeplink_command
- commands/fiend_command
- commands/init_command
- commands/make_command
- commands/run_command
- commands/watch_command
- core/app_helper
- core/colors_text
- core/constants/packages_name
- core/creator_util
- core/extensions
- core/helpers/updated_features_in_config
- core/user_helper
- creatores
- functions/add_action
- functions/deeplink/deeplink_setup
- functions/deeplink/deeplink_test
- functions/deeplink/extract_project_info
- functions/delete_file
- functions/extract_strings
- functions/fiend_unused_package
- functions/fined_unused_assets
- functions/fined_unused_file
- functions/formate_code
- functions/get_app_name
- functions/install_package
- functions/localization/add_keys_to_arb
- functions/localization/analyze_missing_keys
- functions/run_pub_get
- functions/watch_localization
- samples/api_util_sample
- samples/app_colors_sample
- samples/app_config_sample
- samples/app_feature_sample
- samples/app_storage_sample
- samples/app_theme_sample
- samples/cubit_samples
- samples/deeplink_samples
- samples/extensions/context_extension_sample
- samples/feature_sample
- samples/form_sample
- samples/home_sample
- samples/main_sample
- samples/page_sample
- samples/splash_feature_sample
- samples/splash_page_sample
- samples/state_samples
- samples/utils/notification_util_sample