This CLI consists of a way to assemble your project structured by modules, pages, repositories, widgets always following the standards of good practices that has been applied by the community flutter in bigger and more structured projects. It also provides the libraries manager (libs or pubs) with it you can install multiple libraries with just one command line and even remove and update.
athena generate module page/search
The main folder is no longer called "src" but "app"
We realized that the lack of a project pattern is affecting the productivity of several developers at that initial moment, so we are proposing a development pattern along with a tool that imitates NPM (NodeJS) functionality as well as template generation capabilities (similar to Scaffold ).
About the Proposed Pattern. #
We adopted the BLoC standard for business rule in a structure similar to MVC, where a page or widget has one or more BLoC to manage its business rule.
We are using the module structure and dependency injection of the package bloc_pattern. Read the bloc_pattern README to familiarize yourself with the concept of dependency injection, BLoC Provider and modules.
For services and provider we use the Repository Pattern.
In this way our folder structure is organized into local modules and a global module, as well as models, repositories and BLoC`s that can be accessed throughout the application in the shared folder.
Sample folder structure generated by athena:
- You need to have the Dart SDK installed. If you do not have download now.
- Now just activate the athena using the pub:
pub global activate athena
athena --version- if you return the athena version you can consider the complete installation.
- To update the athena just use the command:
Ready now you can enjoy this new world.
start: Create a basic structure for your project (confirm that you have no data in the "lib" folder).
run: Run scripts placed in the "scripts" parameter in pubspect.yaml
athena run open_folder
Install: Install (or update) a new package or packages:
athena install rxdart dio bloc_pattern
You can also install a package as dev_dependency using the flag --dev
athena i flutter_launcher_icons --dev
remove a package
athena uninstall dio
You can also remove a dev_dependency using the flag --dev
Create a module, page, widget or repository according to the option.
Creates a new module with athena generate module:
athena generate module manager/product
Creates a new page and its respective Bloc
athena generate page manager/product/pages/add_product
Creates a new widget and its respective Bloc:
athena generate widget manager/product/widgets/product_detail
NOTE: You can create a page or widget with your respective BLoC using the flag -b
Create a new repository
athena g r manager/product/repositories/product
Common errors: #
If you find out with the above error, when trying to run or the
pub global activate athena, then you will have to put in the environment variables manually:
Go to windows search and search for:
Edit System variable
After click in
Then click in New and add the path that appeared on your console in case here is :
C:\Users\1513 MX5-7\AppData\Roaming\Pub\Cache\Bin after that just restart your CMD.
For more details Telegram Group Flutterando
- minimal fix
- fork from slidy
A new Flutter project.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as an executable
1. Install it
You can install the package from the command line:
$ pub global activate athena
2. Use it
The package has the following executables:
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: athena: ^1.0.1
2. Install it
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Nov 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.0
- pana: 0.12.21
Detected platforms: other
dartfmt to format
dartfmt to format
Maintenance issues and suggestions
Homepage URL doesn't exist. (-20 points)
At the time of the analysis the
https://github.com/manacespereira/athena was unreachable.
|Dart SDK||>=2.2.0 <3.0.0|