fluttermtl / instreal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

instreal

A new Flutter project.

Getting Started

How to start the Firebase emulator

The application requires the Firebase to run. The debug build connects to the local emulator by default while the production build connects to the production Firebase.

  1. Install the Firebase CLI https://firebase.google.com/docs/cli#setup_update_cli

  2. Start emulator

    firebase emulators:start

To disable the emulator in the dev environment, disable the line of codes in lib/main.dart or build in production mode

  if (kDebugMode) {
    try {
      FirebaseFirestore.instance.useFirestoreEmulator('localhost', 8080);
    } catch (e) {
      // ignore: avoid_print
      print(e);
    }
  }

How to initialize Firebase

Reference: https://firebase.google.com/docs/flutter/setup?platform=web

  1. Create a Firebase project from https://firebase.google.com/

  2. Install Firebase CLI https://firebase.google.com/docs/cli#setup_update_cli

  3. Login to firebase

    firebase login
  4. Install FlutterFire

    dart pub global activate flutterfire_cli
  5. Configure it using this command in the Project

    flutterfire configure

About


Languages

Language:C++ 34.2%Language:CMake 27.7%Language:Dart 21.8%Language:HTML 6.5%Language:Ruby 4.5%Language:Swift 3.1%Language:C 2.1%Language:Kotlin 0.2%Language:Objective-C 0.1%