A production ready flutter application template for the provider architecture.
- This project is a starting point for a Flutter application using the provider architecture.
- This project heavily uses the flutter tutorials and snippets of the filled stacks YouTube channel.
- Feel free to send in Pull Requests to improve the application.
Filled Stacks Links:
. ├── core │ ├── constant │ ├── data_sources │ ├── enums │ ├── exceptions │ ├── localization │ ├── managers │ ├── mixins │ ├── models │ ├── repositories │ ├── services │ ├── utils │ └── view_models └── ui ├── shared ├── views └── widgets- bottom navigation bar
- intuitive UI router
- script for auto formatting on commits
- localization
- validation mixin for forms
- json serialization
- auth service example
- dialog service
- connectivity service
- hardware info service
- http service
- navigation service
- key storage service
- local storage service (NoSQL)
- system light/dark theme support
- platform adaptive widgets
- life cycle manager to start/stop background services
- app settings launcher
- custom fonts
- custom app icons
- custom native splash screen
- snack bar service
- responsive views
- unit tests
- location service
- location permission service
- Home View (Renders a list of posts fetched from JSON place holder API)
- Login View (Form that simulates user login and form validation)
- Main View (View that handles tab navigation)
- Splash View (Initial loading screen that uses flare animations)
- Post Details (Dynamic view that loads the post's user information)
- Settings View (Example view that launches app settings and signs out user)
- run
chmod +x ./format.sh && ./format.shto setup git pre commit formatting or - run
chmod +x ./manual_format.shand run./manual_format.shwhenever you want to format the dart code - run
flutter packages pub run build_runner build --delete-conflicting-outputsif you plan to add/change any serializers once - run
flutter packages pub run build_runner watch --delete-conflicting-outputsif you plan to add/change any serializers multiple times
- Find the language local code from here codes
- Inside of
lib/local_setup.dartadd the local code tosupportedLocalCodes - Add the local code to the
CFBundleLocalizationsarray inios/Runner/Info.plist - Create a
<local>.jsonfile under assets/lang/ and fill out every value for your language - Run
flutter cleaninside you lib apps directory if flutter complains - There is also a different way to implement locals using the intl package. An example on how to do so can be found here
- Change icon
assets/images/logo.pngto another image - If new icon has a different path update
flutter_icons:in thepubspec.yamlfile - Run
flutter pub getand thenflutter pub run flutter_launcher_icons:main
- Create a
<YOUR_MODEL>.dartundercore/models/<YOUR_MODEL>/<YOUR_MODEL>.dart - Copy the
AlertRequestfromcore/models/alert_request/alert_request.dartand replace all the class model names with<YOUR_MODEL> - Add your own custom getter values.
- Add a part file. Ex:
<YOUR_MODEL>.g.dartabove the class - Run
flutter packages pub run build_runner build --delete-conflicting-outputsto build your new model
- Create a
<YOUR_MODEL>.dartundercore/models/<YOUR_MODEL>/<YOUR_MODEL>.dart - Copy the
Userfromcore/models/user/user.dartand replace all the class model names with<YOUR_MODEL> - Add your own custom getter values.
- Add
<YOUR_MODEL>to the list in@SerializersForclass constructor found undercore/models/serializer.dart - Run
flutter packages pub run build_runner build --delete-conflicting-outputsto build your new model
- Currently Hive does not override the hashcode and == operator for a class. This causes mock tests to fail. To fix this issue simply override the two getters like in the post_h.g.dart file example.