generator-flyme
generator for flutter.
Installation
First, install Yeoman and generator-flyme using npm (we assume you have pre-installed node.js).
npm install -g yonpm install -g generator-flyme
Then generate your new project:
yo flyme
Getting Started
just input the command:
yo flyme
generator-flyme provides 6 kinds of command:
Kinds of Command
All name should be decamelized, for example: foo-boo.
- project: create a new flutter project.
- package: create a new package. And it canbe published to the community.
- general dart package.
- android/iOS native plugin.
- native plugin: create a new native plugin. Just in your project.
- feature: create a new feature. You can choose which architecture you like:
- clean architecture. (recommand)
- general architecture components.
- page: create a new page. Auto generate page file and view model file.
- use case: create a new use case. Auto generate repository files and data source files.
File Tree
Clean Architecture
lib/pages/home├── data│ ├── data_sources│ │ ├── local│ │ │ └── home_local_data_source.dart│ │ └── remote│ │ └── home_remote_data_source.dart│ ├── models│ └── repositories│ └── home_repository_impl.dart├── domain│ ├── entities│ ├── repositories│ │ └── home_repository.dart│ └── use_cases│ └── home_use_case.dart├── presentation│ ├── components│ ├── pages│ │ ├── home_page.dart│ │ └── pages.dart│ ├── view_models│ │ ├── home│ │ │ ├── home_view_model.dart│ │ │ ├── home_view_model.g.dart│ │ └── view_models.dart│ └── widgets└── utils
General Architecture Components
lib/pages/home├── data│ ├── home_data_source.dart│ ├── home_repository.dart│ ├── local│ │ └── home_local_data_source.dart│ ├── models│ └── remote│ └── home_remote_data_source.dart├── domain│ └── entities├── home_page.dart├── interactor│ └── home_use_case.dart├── presentation│ ├── components│ └── widgets├── second_page.dart├── utils└── view_model ├── home_view_model.dart └── test_view_model.dart
License
MIT © MeePwn