Flutter Module Creator
Create modules in a Melos monorepo workspace with proper configuration.
Module Types
| Type | Command | Description |
|---|---|---|
app | python scripts/create_module.py app <name> | Flutter application |
app --console | python scripts/create_module.py app <name> --console | Dart console application |
package | python scripts/create_module.py package <name> | Dart package |
package --flutter | python scripts/create_module.py package <name> --flutter | Flutter package |
plugin | python scripts/create_module.py plugin <name> | Flutter plugin |
ffi | python scripts/create_module.py ffi <name> | Flutter FFI plugin |
Usage Examples
bash
# Create Flutter app python scripts/create_module.py app my_app # Create Dart console app python scripts/create_module.py app my_cli --console # Create Dart package python scripts/create_module.py package my_utils # Create Flutter package python scripts/create_module.py package my_widgets --flutter # Create plugin with specific platforms python scripts/create_module.py plugin my_plugin --platforms android,ios # Create FFI plugin (all platforms by default) python scripts/create_module.py ffi my_native # Skip melos bootstrap python scripts/create_module.py package my_pkg --no-bootstrap
Options
- •
--console: Create Dart console app (app type only) - •
--flutter: Create Flutter package (package type only) - •
--platforms <list>: Comma-separated platforms (plugin/ffi) - •
--workspace <path>: Workspace root (auto-detected) - •
--no-bootstrap: Skip melos bootstrap
Behavior
The script automatically:
- •Detects workspace root (directory with melos/workspace in pubspec.yaml)
- •Creates module in
apps/(apps) orpackages/(packages/plugins/ffi) - •Configures
analysis_options.yamlwith appropriate lints - •Adds
resolution: workspaceto module pubspec.yaml - •Updates root
workspace:list in root pubspec.yaml - •Copies LICENSE from workspace root
- •Runs
melos bootstrap