简体   繁体   中英

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'); . In the docs, including the package's example on pub.dev, this useEmulator method does exist. 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. 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. These versions support useEmulator.

Which version of Firebase did you use? iOS, Android or Web?

Try to upgrade to last version of Firebase, the useEmulator feature is pretty new.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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