This is a template project which serves the purpose of firestore database management, state management, route management, localisation management & app theme management. Fetching, Adding, updating & deleting of the entries from firestore database is implemented in this template with the help of firebase dependencies and crud firestore data source and repository impl classes. State management, route management & app theme management is also implemented with the use of "GetX" library. State management is performed with the help of "GetX controllers" along with some core classes which handles lots of basic functionalities like search, filters, pagination etc. Route management is performed with the help of "Bindings". App theme management is performed with the use of controllers and "GetX" functions. Localisation with the support of two languages "EN" & "ES" is also implemented in this template with the help of flutter_intl & GetX controllers.
Following are some modules included in this project.
- Dashboard
- Grocery
- Settings
Splash page | Grocery list page | Settings page | Add Grocery popUp |
---|---|---|---|
Splash page | Grocery list page | Settings page | Add Grocery popUp |
---|---|---|---|
Grocery list page | Settings page | Add Grocery popUp |
---|---|---|
This project is build to Showcase following things implemented in this project.
- Firestore database management.
- Clean Architecture
- State management using GetX.
- Route management using GetX.
- Advance code structure.
- Firestore datastore CRUD impl.
- Localisation.
- App Theme management using GetX.
.
├── _config # files for enviornment related settings DEV, PROD
├── _core # core file independent of project/app
├── _shared # project dependent but app independent
├── app # app-specific files modules based on clean architecture.
│ ├── di # a centralized place to manage all dependencies in app
│ ├── extra # common files like enums, images, fields files
│ ├── modules # various functional modules/features of app
│ │ ├── grocery # gorcery specific files
│ │ │ ├── data # responsible for data fetching from remote or local database
│ │ │ │ ├── sources # various data sources like local, remote to communicate with respetive source.
│ │ │ │ └── repositories # Reponsible for managing data sources. It has actual implementation.
│ │ │ ├── domain # This is the central layer of the feature with all business logic.
│ │ │ │ ├── entities # The model class which is mapped from data model class.
│ │ │ │ ├── repositories # Rules of what needs to be implemented to obtain domain model.
│ │ │ │ └── usecases # A unique use case for every logic inside a particular feature.
│ │ │ └── presentation # UI layer for data showing and user interactions.
│ │ │ ├── controllers # Unit tests
│ │ │ ├── pages # representing a single screen of the feature
│ │ │ └── widgets # Resuable widgets
│ │ └── dashboad
│ ├── ui # app theme, style guides, resusable ui components
│ ├── utils # app specific utils
│ └── widgets # common resusable ui components
├── generated # automatic generated language files
├── l10n # supported language files
└── main.dart # Entry point
- Clone project in local repository.
- Run command flutter pub get
- Run command flutter pub global run intl_utils:generate.
Following technologies are used in this project.
- [dartz] (https://pub.dev/packages/dartz)
- [equatable] (https://pub.dev/packages/equatable)
- [get_storage] (https://pub.dev/packages/get_storage)
- [logger] (https://pub.dev/packages/logger)
- [intl] (https://pub.dev/packages/intl)
- [intl_utils] (https://pub.dev/packages/intl_utils)
- [get] (flutter sdk)
- [get_it] (flutter sdk)
- [flutter_localizations] (flutter sdk)
- [cupertino_icons] (https://pub.dev/packages/cupertino_icons)
- [persistent_bottom_nav_bar] (https://pub.dev/packages/persistent_bottom_nav_barr)
- [fluttertoast] (https://pub.dev/packages/fluttertoast)
- [sized_context] (https://pub.dev/packages/sized_context) 10.[time] (https://pub.dev/packages/time) 11.[timeago] (https://pub.dev/packages/timeago) 12.[connectivity] (https://pub.dev/packages/connectivity)
- [firebase_core] (https://pub.dev/packages/firebase_core)
- [firebase_storage] (https://pub.dev/packages/firebase_storage)
- [firebase_auth] (https://pub.dev/packages/firebase_auth)
- [cloud_firestore] (https://pub.dev/packages/cloud_firestore)
- [cloud_functions] (https://pub.dev/packages/cloud_functions)