- Architecture: Clean Architecture
- State management: flutter_bloc
- DI: get_it, injectable
- REST API: dio
- Shared Preferences: shared_preference
- Lint: dart_code_metrics, flutter_lints
- CI/CD: Github Actions, Bitbucket Pipelines
- Utils: rxdart, dartx, async
- Assets generator: build-runner, flutter_launcher_icons, flutter_native_splash
└── flutter_clean_base/
├── analysis_options.yaml
├── assets
│ ├── fonts
│ ├── images
│ ├── json
│ └── translations
├── lib
│ ├── app
│ ├── flavors.dart
│ ├── main.dart
│ ├── main_dev.dart
│ ├── main_stg.dart
│ ├── presentation
│ └── test.dart
├── melos.yaml
├── package
│ ├── data
│ ├── domain
│ └── shared
├── pubspec.lock
├── pubspec.yaml
├── scripts
│ ├── gen.sh
│ ├── pub_get.sh
│ ├── run_dev.sh
│ └── run_prod.sh
└──
Flutter_Clean_Base/
__root__
analysis_options.yaml ❯ Code Convention
melos.yaml ❯ Multiple Module Configuration
pubspec.yaml ❯ Packages Dependence
lib
main_dev.dart ❯ REPLACE-ME
main.dart ❯ REPLACE-ME
test.dart ❯ REPLACE-ME
flavors.dart ❯ REPLACE-ME
main_stg.dart ❯ REPLACE-ME
presentation
presentation.dart ❯ REPLACE-ME
main
main_screen.dart ❯ REPLACE-ME
search_page.dart ❯ REPLACE-ME
settings_page.dart ❯ REPLACE-ME
notifications_page.dart ❯ REPLACE-ME
login
login_screen.dart ❯ REPLACE-ME
bloc
login_bloc.dart ❯ REPLACE-ME
login_event.dart ❯ REPLACE-ME
login_state.dart ❯ REPLACE-ME
base
base_state.dart ❯ REPLACE-ME
splash
splash.dart ❯ REPLACE-ME
home
home_screen.dart ❯ REPLACE-ME
bloc
home_bloc.dart ❯ REPLACE-ME
home_event.dart ❯ REPLACE-ME
home_state.dart ❯ REPLACE-ME
app
routes_manager.dart ❯ REPLACE-ME
snackbar_util.dart ❯ REPLACE-ME
di.dart ❯ REPLACE-ME
app.dart ❯ REPLACE-ME
device_utils.dart ❯ REPLACE-ME
functions.dart ❯ REPLACE-ME
widget_util.dart ❯ REPLACE-ME
scripts
pub_get.sh ❯ Pub Get Scripts
run_prod.sh ❯ Run App Flavor Prod
gen.sh ❯ Generate Code
run_dev.sh ❯ Run App Flavor Dev
package
shared
analysis_options.yaml ❯ REPLACE-ME
pubspec.yaml ❯ REPLACE-ME
.metadata ❯ REPLACE-ME
lib
shared.dart ❯ REPLACE-ME
src
model
server_error_detail.dart ❯ REPLACE-ME
server_error.dart ❯ REPLACE-ME
big_decimal.dart ❯ REPLACE-ME
typedef.dart ❯ REPLACE-ME
shared_enum.dart ❯ REPLACE-ME
helper
helper.dart ❯ REPLACE-ME
app_info.dart ❯ REPLACE-ME
stream
stream.dart ❯ REPLACE-ME
dispose_bag.dart ❯ REPLACE-ME
stream_logger.dart ❯ REPLACE-ME
disposable.dart ❯ REPLACE-ME
mixin
log_mixin.dart ❯ REPLACE-ME
constant
duration_constants.dart ❯ REPLACE-ME
symbol_constants.dart ❯ REPLACE-ME
app_constants.dart ❯ REPLACE-ME
locale_constants.dart ❯ REPLACE-ME
shared_preference_constants.dart ❯ REPLACE-ME
uni_links_constants.dart ❯ REPLACE-ME
definition
enums.dart ❯ REPLACE-ME
log_config.dart ❯ REPLACE-ME
type_alias.dart ❯ REPLACE-ME
flavors.dart ❯ REPLACE-ME
failure.dart ❯ REPLACE-ME
format
date_time_format_constants.dart ❯ REPLACE-ME
number_format_constants.dart ❯ REPLACE-ME
server
response_constrant.dart ❯ REPLACE-ME
ui
ui_constants.dart ❯ REPLACE-ME
paging_constants.dart ❯ REPLACE-ME
device_constants.dart ❯ REPLACE-ME
util
function
check_null_util.dart ❯ REPLACE-ME
enum_util.dart ❯ REPLACE-ME
fcm_util.dart ❯ REPLACE-ME
image_util.dart ❯ REPLACE-ME
number_format_util.dart ❯ REPLACE-ME
function.dart ❯ REPLACE-ME
extensions.dart ❯ REPLACE-ME
notification_util.dart ❯ REPLACE-ME
badge_util.dart ❯ REPLACE-ME
device_utils.dart ❯ REPLACE-ME
date_format_util.dart ❯ REPLACE-ME
call_util.dart ❯ REPLACE-ME
app_log_util.dart ❯ REPLACE-ME
resources
styles_manager.dart ❯ REPLACE-ME
theme_manager.dart ❯ REPLACE-ME
strings_manager.dart ❯ REPLACE-ME
font_manager.dart ❯ REPLACE-ME
resources.dart ❯ REPLACE-ME
language_manager.dart ❯ REPLACE-ME
assets_manager.dart ❯ REPLACE-ME
color_manager.dart ❯ REPLACE-ME
values_manager.dart ❯ REPLACE-ME
widget
dialog_util.dart ❯ REPLACE-ME
widget.dart ❯ REPLACE-ME
long_press_gesture.dart ❯ REPLACE-ME
exception
parse
parse_exception.dart ❯ REPLACE-ME
remote_config
remote_config_exception.dart ❯ REPLACE-ME
uncaught
app_uncaught_exception.dart ❯ REPLACE-ME
base
exception_mapper.dart ❯ REPLACE-ME
app_exception_wrapper.dart ❯ REPLACE-ME
app_exception.dart ❯ REPLACE-ME
validation
validation_exception.dart ❯ REPLACE-ME
remote
remote_exception.dart ❯ REPLACE-ME
domain
analysis_options.yaml ❯ REPLACE-ME
pubspec.yaml ❯ REPLACE-ME
.metadata ❯ REPLACE-ME
lib
domain.dart ❯ REPLACE-ME
src
usecase
base_usecase.dart ❯ REPLACE-ME
login_usecase.dart ❯ REPLACE-ME
entity
base_entity.dart ❯ REPLACE-ME
entity.dart ❯ REPLACE-ME
authentication
coordinates_entity.dart ❯ REPLACE-ME
address_entity.dart ❯ REPLACE-ME
user_entity.dart ❯ REPLACE-ME
company_entity.dart ❯ REPLACE-ME
crypto_entity.dart ❯ REPLACE-ME
bank_entity.dart ❯ REPLACE-ME
repository
repository.dart ❯ REPLACE-ME
Before getting started with flutter_clean_base
, ensure your runtime environment meets the following requirements:
- Programming Language: Dart,Swift,Kotlin
- Package Manager: Pub, Gradle, Melos
Install flutter_clean_base
using one of the following methods:
Build from source:
- Clone the
flutter_clean_base
repository:
❯ git clone https://github.com/vanhoangg/flutter_clean_base
- Navigate to the project directory:
❯ cd flutter_clean_base
- Install the project dependencies:
❯ dart pub global activate melos
❯ melos bootstrap
Run flutter_clean_base
using the following command:
- Navigate to script directory:
❯ cd scripts
❯ sh gen.sh
❯ sh run_dev.sh
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
flutter_clean_base
project. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/vanhoangg/flutter_clean_base
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
-
complete_advanced_flutter: https://github.com/minafarideleia/complete_advanced_flutter
-
Flutter-Bloc-CleanArchitecture: https://github.com/ntminhdn/Flutter-Bloc-CleanArchitecture
-
Code-generation tool: https://github.com/ntminhdn/Flutter-Bloc-CleanArchitecture/blob/master/tools/nals/nalsmobilebrain-0.10.0.vsix
-
Tool's features: https://medium.com/@NALSengineering/a-must-have-tool-if-youre-working-with-clean-architecture-4cfd07b473b6
-
How to build the tool: https://medium.com/@NALSengineering/code-2x-faster-with-custom-vscode-extensions-4f68e362be3d