sinar12 0.0.4
sinar12: ^0.0.4 copied to clipboard
A CLI tool for generating Sinar12 Flutter architecture projects and modules.
sinar12 #
A powerful CLI tool designed to accelerate Flutter application development by standardizing project architecture and automating module scaffolding, specifically optimized for Riverpod state management and Dio networking.
Features #
- Project Scaffolding: Quickly generate a standardized Flutter project structure, complete with a robust core networking service setup.
- Module Generation: Automatically scaffold complete feature modules with a single command. Every module includes:
- Data Models
- API Services (Dio)
- Riverpod Providers
- UI Pages
- Clean Architecture: Enforces a clean separation between the data, service, and presentation layers.
Getting started #
Activate the CLI globally using Dart:
dart pub global activate sinar12
Note: Ensure your global Dart packages path is correctly added to your system environment variables.
Usage #
1. Initialize Project Structure #
Initialize the base architecture at the root of your newly created Flutter application:
sinar12 create project
This generates essential base directories (lib/models, lib/service, lib/pages, lib/component, lib/riverpod) and sets up a CommonService.dart class pre-configured for handling CRUD HTTP requests with Dio.
2. Generate Modules #
Whenever you need a new feature, use the module generator to ensure consistent architecture across your app.
sinar12 create module product
This will automatically scaffold the following files:
lib/models/product_model.dartlib/service/product_service.dartlib/riverpod/product_provider.dartlib/pages/product_page.dart
Each file is populated with boilerplate logic tightly integrated with your CommonService and Riverpod state management context!
Additional information #
For bug reports, feature requests, and contributions, please visit our GitHub Repository. Contributions are welcome!