Skip to content

GoldenOwlAsia/mobile-flutter-template

Repository files navigation

GoldenOwl Flutter Boilerplate

Kickstart your next Flutter project with this production-ready boilerplate — pre-configured with Bloc, Routing, and other essentials to help you focus on building features, not setup.


Table of Contents


Prerequisites


How to Run

  1. Clone the repo:

    git clone https://github.com/GoldenOwlAsia/mobile-flutter-template.git
  2. Install dependencies:

    flutter pub get
  3. Generate code:

    flutter packages pub run build_runner build
  4. Run the app (Staging):

    flutter run --flavor staging --target lib/main_staging.dart
  5. Run the app (Production):

    flutter run --flavor production --target lib/main.dart

Using This Template

  1. Clone this repo:

    git clone https://github.com/GoldenOwlAsia/mobile-flutter-template.git
  2. Customize the package name:

    sudo sh ./customizer.sh your.package.name

    ✅ This will:

    • Remove the existing git history
    • Update the README
    • Change your bundle ID
  3. Update your Firebase config:

    • Android
      • android/app/src/staging/google-services.json
      • android/app/src/production/google-services.json
    • iOS
      • ios/config/GoogleService-Info.plist (staging & production)
    • Update:
      • firebase_options_stg.dart
      • firebase_options_prod.dart
      • REVERSED_CLIENT_ID in Info.plist
  4. Regenerate Firebase options:

    flutterfire config      --project={YOUR_FIREBASE_PROJECT_ID}      --out={PATH_TO_SAVE/firebase_options.dart}      --ios-bundle-id={BUNDLE_ID_APP}      --android-app-id={APP_ID}

    Read More in the Wiki

  5. Change App Icon For icons for all resolutions. They will be generated from the 512 or 1024 logo provided. Use generator : with logo source file to generate them. https://makeappicon.com/

  • Android: Then add a new folder named after your new app name inside android/app/src folder
  • iOS: Replace ios/Runner/Assets.xcassets/AppIcon.appiconset/ folder
  1. Change Splash Screen
  • Android: Set the background color value ./android/app/src/main/res/drawable/ic_launcher_background.xml
  • iOS: Open LaunchScreen.storyboard with XCode then edit
  1. Run the app: Follow steps here

Code Conventions

Best Practices:

  • Modularize widgets to be as independent and reusable as possible.
  • Follow naming conventions:
    • Models: start with MMUser, MProduct, MGroup
    • Common Widgets: start with XXButton, XText, XAppBar (stored in lib/widgets/)
    • App Constants/Services: start with AppAppStyles, AppColor, AppRouter, AppCoordinator, UserPrefs

Dependencies

Dependencies

Helpers

HTTP / API

  • http – HTTP requests

Firebase

  • FlutterFire – Auth, Analytics, Crashlytics, Storage, Firestore

State Management

Assets / Code Generation

Localization

Widgets

Image & Cache


Code Structure

Default Flutter Structure

flutter-app/
|- android
|- ios
|- web
|- lib
|- modules
|- test

Project Structure Used

lib/
|- packages/
|- src/
  |- data/
  |- services/
  |- feature/
    |- dashboard/
      |- widget/
      |- controller/
      |- dashboard_screen.dart
    |- home/
    |- login/
  |- plugins/
  |- routing/
|- widgets/
  |- button/
  |- image/
  |- view/
|- main.dart
|- modules/

Navigation Stack

Navigation Stack


Wiki

Check out the Wiki for more detailed guides.


Screenshots

Account Profile Login

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors