简体   繁体   English

Flutter Firebase Auth Emulator 不适用于 firebase auth 版本 1.01

[英]Flutter Firebase Auth Emulator not working for firebase auth version 1.01

I get this error, the method 'useEmulator' isn't defined for the type 'FirebaseAuth' when trying to set up an emulator connection using _auth = await FirebaseAuth.instance.useEmulator('http://localhost:9099');我收到此错误,在尝试使用_auth = await FirebaseAuth.instance.useEmulator('http://localhost:9099');设置模拟器连接时the method 'useEmulator' isn't defined for the type 'FirebaseAuth' . . In the docs, including the package's example on pub.dev, this useEmulator method does exist.在文档中,包括 pub.dev 上的包示例,这个 useEmulator 方法确实存在。 Was it removed in the newer versions and not documented?它是否在较新的版本中被删除并且没有记录? If so, is there a new implementation for me to use.如果是这样,是否有新的实现供我使用。 I'm using Flutter 2.0.0 stable and firebase_core: ^1.0.2 firebase_auth: ^1.0.1 without null safety.我正在使用 Flutter 2.0.0 stable 和 firebase_core: ^1.0.2 firebase_auth: ^1.0.1 没有 null 安全。 Thanks.谢谢。

EDIT编辑


I was running on a cached version of my dependencies which was not picking firebase_core: ^1.0.2 firebase_auth: ^1.0.1.我在我的依赖项的缓存版本上运行,它没有选择 firebase_core: ^1.0.2 firebase_auth: ^1.0.1。 These versions support useEmulator.这些版本支持 useEmulator。

Which version of Firebase did you use?您使用的是哪个版本的 Firebase? iOS, Android or Web? iOS、Android 还是 Web?

Try to upgrade to last version of Firebase, the useEmulator feature is pretty new.尝试升级到 Firebase 的最新版本, useEmulator功能相当新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM