Base Clean Flutter

A base Flutter application using clean architecture and bloc pattern

Commands

Getting Started

  • Run above commands to gen files
  • Config api: api_config.dart
  • Config database: database_config.dart
  • Config multi flavor like App Name, App Id (Bundle Id):
    • Android: android/app/build.gradle
    • iOS: ios/Flutter/Develop.xcconfig, ios/Flutter/Staging.xcconfig and ios/Flutter/Production.xcconfig
  • Config deeplink multi flavor:
    • Android: android/app/src/main/AndroidManifest.xml and android/app/build.gradle
    • iOS: ios/Runner/Runner.entitlements
    • For more information, please follow this link
  • Config FCM multi flavor:
    • Integrated for Android only, for iOS please follow this link
    • Android: android/app/src/develop/google-services.json, android/app/src/staging/google-services.json and android/app/src/production/google-services.json
    • iOS: ios/config/develop/GoogleService-Info.plist, ios/config/staging/GoogleService-Info.plist and ios/config/production/GoogleService-Info.plist
  • Config Fastlane (auto deploy your app to Firebase Distribution):
    • Integrated for Android only, for iOS please follow this link
    • Fill the release notes to change_log.txt
    • Android: android/fastlane/Appfile and android/fastlane/Fastfile
    • iOS: ios/fastlane/Appfile and ios/fastlane/Fastfile
  • Config build release Firebase Distribution:
    • Integrated for Android only
    • Android:
      • Create new folder named distribution in folder android
      • Create new keystores file (.jks) in folder: android/distribution
      • Create new properties file named keystore.properties in folder android/distribution
      • Fill your keystores information to the keystore.properties file:
storeFile=../distribution/[YOUR_KEYSTORES_FILE_NAME]
storePassword=[YOUR_KEYSTORES_STORE_PASSWORD]
keyAlias=[YOUR_KEYSTORES_KEY_ALIAS]
keyPassword=[YOUR_KEYSTORES_KEY_PASSWORD]
  • Command build release:
    • Integrated for Android only
    • Android: cd to folder android
    • Run commands:
      • build Develop Release: bundle exec fastlane distributeDevelop
      • build Staging Release: bundle exec fastlane distributeStaging
      • build Production Release: bundle exec fastlane distributeProduction

Features