【发布时间】:2021-08-30 13:17:21
【问题描述】:
您好,我目前正在使用 firebase 的本地模拟器和颤振。但是,我使用的是真实设备而不是模拟器,因此我不知道如何连接到我的笔记本电脑 localhost。我目前正在使用此代码
// [Firestore | localhost:8080]
FirebaseFirestore.instance.settings = const Settings(
host: "localhost:8080",
sslEnabled: false,
persistenceEnabled: false,
);
// [Authentication | localhost:9099]
await FirebaseAuth.instance.useEmulator("http://localhost:9099");
FirebaseFunctions.instance.useFunctionsEmulator(
origin: "http://localhost:5001"
);
// [Storage | localhost:9199]
await FirebaseStorage.instance.useEmulator(
host: "localhost",
port: 9199,
);
【问题讨论】:
标签: firebase flutter google-cloud-functions firebase-tools