Skip to content

Latest commit

 

History

History
126 lines (83 loc) · 3.92 KB

README-SAMPLE.md

File metadata and controls

126 lines (83 loc) · 3.92 KB

Morning Bird

Table of contents

Prerequisites

  • Flutter 3.10.x
  • Android Studio - latest version
  • MacOS & XCode (for build & debug iOS)

Link

How to Use

  • Step 1: Download or clone this repo by using the link below:

    https://gitlab.com/
  • Step 2: Install Flutter

    • Install the platform-specific SDK here
  • Step 3: Setup flutter and run locally

    • Go to project root and execute the following command in console to get the required dependencies:

      flutter pub get
    • Connect your physical device or open simulator. then run your app

      flutter run
  • Step 4: This project uses inject library that works with code generation, execute the following command to generate files (re-run every time you change one of these files)

    - Firstly, If you have not install flutter_gen yet. [Click here](https://pub.dev/packages/flutter_gen#installation)
    - Secondly, generate files for packages that use build_runner (auto_route, freezed...)
        ```sh
        flutter pub run build_runner build --delete-conflicting-outputs
        ```
    
  • Step 5: Execute the following command to build app:

    Android:

    1. Change version and build number in pubspec.yaml

      flutter build appbundle
      
    2. Or run command line below to build with your build version

      flutter build appbundle --build-name=1.2.0 --build-number=2
      
    3. Access Play console to create a new release and upload your build

    iOS

    1. Change version and build number in Xcode
    2. Access https://developer.apple.com/ to download profile and signing your app
    • Manually: Pod install then Open Xcode to deploy

      flutter build ios --release --no-codesign
      cd ios && pod install
      • Open XCode and deploy
      • On menu bar, select Product > Archive to build and deploy to TestFlight
    • Use Fastlane: run command bellow

      cd ios
      fastlane beta

Code Conventions

  • analysis_options.yaml

  • About code analytics flutter

    In Flutter, Modularization will be done at a file level. While building widgets, we have to make sure they stay independent and re-usable as maximum. Ideally, widgets should be easily extractable into an independent project.

  • Must know

    • Model name start with M: MUser, MProduct, MGroup...
    • Common widget start with X: XButton, XText, XAppbar... - These widgets under folder lib/widgets/
    • App Constants class or service start with Add: AppStyles, AppColor, AppRouter, AppCoordinator,.. and UserPrefs

Git Conventions

Dependencies

  • flutter_bloc A dart package that helps implement the BLoC pattern. Learn more at bloclibrary.dev!

  • go_route It’s a Flutter navigation package

  • flutter_gen The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.

Screenshot