flutter_smartgen 0.5.0
flutter_smartgen: ^0.5.0 copied to clipboard
CLI that scaffolds Flutter feature-module pages with GetX, registers routes, syncs AppImages, creates environment files, and scaffolds lib/app. Configure via smartgen.yaml.
0.5.0 #
New: smartgen app #
- Scaffold
lib/app/files aligned with common GetX app structure (11 files). smartgen app— create all missing files;smartgen app <name>— one file (e.g.fonts,class).- Skip-if-exists: never overwrites existing files.
AppClassincludes singleton +RxBool isLoading = false.obs; other classes are empty shells.
0.4.0 #
New: smartgen env #
- Create
.env.developmentand.env.productionat the Flutter project root. - Each file includes
BASE_URLandAPI_KEYplaceholders (empty values). - Skip-if-exists: never overwrites an existing env file.
0.3.0 #
New: route registration #
smartgen route <page>— merge-only registration ofAppRoutesconstant andGetPagefor an existing page module.smartgen page <name> --route— generate the page module, then register the route in one step.
0.2.0 #
New: smartgen assets images #
- Generate or update
lib/app/app_images.dartfrom folders listed insmartgen.yaml→assets.images.directories. - Includes every file in each folder (not only images).
- Constants use full paths, grouped with doc comments per folder (
/// Images,/// Icons, …). - Re-run safely: adds new files, keeps existing names, removes constants when the file was deleted.
smartgen initwrites theassets.imagesblock at the bottom ofsmartgen.yaml(# - assets/iconsis a commented example for extra folders).
Page scaffolding (unchanged) #
smartgen initandsmartgen page <name>work as in 0.1.x.
0.1.1 #
- Lower Dart SDK constraint to
>=3.2.0 <4.0.0for broader Flutter compatibility.
0.1.0 #
- Initial release:
smartgen initandsmartgen pagecommands. - Scaffolds six files per feature module (barrel, binding, controller, repository, model, view).
- Optional
common_scaffoldinsmartgen.yaml(otherwise usesScaffold). - Generated views include
_mainBody()withSizedBox()placeholder.