A new Flutter project with advanced setup:
- State management (provider)
- Routing (go_router)
- Theming (Flex color scheme, Google fonts, Font Awesome icons)
- Internationalization
- Launcher and splash icon
- Test case with Provider mocks
Before you start, follow these steps:
- Execute
flutter pub get
to pull dependencies - Execute
flutter gen-l10n
to generate translations
Execute flutter run
or use the respective Flutter plugin for your IDE.
Execute flutter test test
to run the test cases.
Change the package name of this app by executing
dart run change_app_package_name:main com.new.package.name
(uses change_app_package_name)
Add and remove routes in my_router_config in order to implement your custom navigation logic (see also go_router).
If you want to change the app's theme, have a look at the ThemeProviderImpl. Here you can change color schemes and fonts according to your needs. (see also flex_color_scheme)
You can customize launcher and splash icons by
- Replacing icon.png with your custom image
- Executing
dart run flutter_launcher_icons
(uses flutter_launcher_icons) - Executing
dart run flutter_native_splash:create
(uses flutter_native_splash)
In order to add a new language, just add a new file with translations to the
l10n folder and execute flutter gen-l10n
.
For more details see also the official documentation.