Flutter + firebase configure app to use local firebase emulator. After carefully going through the docs here, I got it working by configuring the host setting on the firestore instance:
1 2 3 4 5 6 7 8 9 10 11 | import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:tracker/screens/screens.dart'; void main() async { // This will set the app to communicate with localhost await Firestore.instance.settings(host: "10.0.2.2:8080", sslEnabled: false); runApp(AppSetupScreen()); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.