Flutter boiler plate app with BLoC architecture, authentication, navigation, Lottie animation and internationalisation
A new Flutter project.
The application is environmentalized.
All the values that can be different per envionment are housed in environment.dart
Currently, there are three environments added, development
and production
.
Follow this guide and get credentials for Android and iOS.
com.flutter.mobile
to your.package.com
flutter_mobile_application
to your_application_name
android
and ios
appsgoogle-services.json
present in /android/app/google-services.json
with the one you createdGoogleService-Info.plist
present in /ios/Runner/GoogleService-Info.plist
with the one you createdMake sure everything is installed by running
flutter doctor
flutter run lib/main_developement.dart
. This will run the app with developement env variables.You can add confugurations in the run
section for the various evironments:
{
"configurations": [
{
"name": "Dev",
"type": "dart",
"request": "launch",
"program": "lib/main_development.dart"
},
{
"name": "Prod",
"type": "dart",
"request": "launch",
"program": "lib/main_production.dart"
}
]
}
json_serializable and json_annotation is used to generate code for JSON serialization and deserialization.
*.g.dart
file is generate per model class that has all the generated code.
models
folder in a feature
package.json_annotations
as shown in this exampleflutter pub run build_runner build
. The generated files will be placed in the same folder as the original model.*.g.dart
files manually. Any subsequent build will replace the manually edited files.You might see some errors but it can be ignored.
Application content
Default language,
en
is already added.
intl_utils is used to generate contents for the app.
Content is generated from intl_<lang>.arb
files in l10n.
Content classes are generates in compile time and used to refer the content strings
. A generated
folder contains all the content.
*.arb
To generate content
intl_<lang>.arb
under l10n folder.flutter pub run intl_utils:generate
to generate content classes for the languages.vcs
flutter clean
flutter build apk --release lib/main_development.dart
flutter clean
flutter build apk --release lib/main_production.dart
.
├── assets
│ └── images
└── lib
├── app
├── common
│ ├── bloc
│ │ └── connectivity
│ ├── constants
│ ├── network
│ ├── routes
│ ├── styles
│ └── widgets
├── features
│ ├── authentication
│ │ ├── bloc
│ │ └── repository
│ ├── landing
│ │ └── ui
│ ├── main
│ │ ├── bloc
│ │ ├── models
│ │ ├── pages
│ │ │ ├── account
│ │ │ │ ├── bloc
│ │ │ │ ├── repositories
│ │ │ │ └── ui
│ │ │ │ └── widgets
│ │ │ ├── feed
│ │ │ │ └── ui
│ │ │ ├── home
│ │ │ │ └── ui
│ │ │ └── notification
│ │ │ └── ui
│ │ ├── repositories
│ │ └── ui
│ │ └── widgets
│ ├── signin
│ │ ├── bloc
│ │ ├── respositories
│ │ └── ui
│ │ └── widgets
│ └── signup
│ ├── bloc
│ ├── respositories
│ └── ui
│ └── widgets
├── generated
│ └── intl
└── l10n