rx_bloc_cli 1.1.0 copy "rx_bloc_cli: ^1.1.0" to clipboard
rx_bloc_cli: ^1.1.0 copied to clipboard

outdated

rx_bloc_cli that enables quick project setup including: flavors, localization [intl], state management [rx_bloc], routing [auto_route], design system, analytics [firebase], tests

example/README.md

Test App #

Getting started #

Before you start working on your app, make sure you familiarize yourself with the structure of the generated project and the essentials that are included with it.

Note: The app contains features that request data from API endpoints hosted on a local server. For the app to function properly, make sure the local server is up and running. For more info, check out the server topic.

Project structure #

Path Contains
lib/base/ Common code used on more than one feature in the project.
lib/base/app/ The root of the application and Environment configuration.
lib/base/common_blocs/ Global BLoCs
lib/base/common_ui_components/ Reusable widgets (buttons, controls etc)
lib/base/common_use_cases/ Global UseCases
lib/base/data_sources/ All data sources are placed here.
lib/base/data_sources/domain/ Data sources, relating to a specific domain
lib/base/data_sources/domain/counter/ Data sources, relating to the counter domain
lib/base/data_sources/local/ Local data sources, such as shared preferences, secured storage etc.
lib/base/data_sources/remote/ External data sources like APIs. Here is placed all retrofit code.
lib/base/data_sources/remote/interceptors/ Custom interceptors that can monitor, rewrite, and retry calls.
lib/base/di/ Global dependencies, available in the whole app
lib/base/extensions/ Global extension methods
lib/base/models/ Data models used in the project
lib/base/repositories/ Repositories used to fetch and persist models.
lib/base/routers/ All routers are placed here. The main router of the app is lib/base/routers/router.dart.
lib/base/routers/guards/ The routers' guards of the app are placed here.
lib/base/theme/ The custom theme of the app
lib/base/utils/ Global utils
lib/feature_X/ Feature related classes
lib/feature_X/blocs Feature related BLoCs
lib/feature_X/di Feature related dependencies
lib/feature_X/use_cases/ Feature related UseCases
lib/feature_X/ui_components/ Feature related custom widgets
lib/feature_X/views/ Feature related pages and forms
lib/main.dart The main file of the app. If there are more that one main file, each of them is related to separate flavor of the app.

Feature structure #

Each feature represents a separate flow in the app. They can be composed of one or more pages (screens) placed inside the features views directory. Every page (screen) should be implemented as a Stateless Widget.

The logic of each page should be placed into its own BLoC. This is desired especially if the page has to be a Stateful Widget. The BLoC is placed inside the blocs directory. In order for the BLoC to be more readable, its implementation details can be offloaded to its own extensions file ( [bloc_name]_extensions.dart, placed inside the same directory) or one or more usecases.

Architecture #

Rx Bloc Architecture

26
likes
0
pub points
12%
popularity

Publisher

verified publisherprimeholding.com

rx_bloc_cli that enables quick project setup including: flavors, localization [intl], state management [rx_bloc], routing [auto_route], design system, analytics [firebase], tests

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, flutter_lints, io, mason, path

More

Packages that depend on rx_bloc_cli