skip to Main Content

How to Handle Firebase Auth exceptions on flutter

I can't handle an error if the user tries to sign up using an already existing email Future _createUser(Users user, String name, x) async { UserCredential result = await FirebaseAuth.instance .createUserWithEmailAndPassword( email: _emailController.text.trim(), password: _passwordController.text.trim()); try { result; } on…

VIEW QUESTION

Flutter code doesn't run when firebase is initialized

So I have this code when I run it without initializing firebase; it works, but once I initialize firebase on the main.dart, it returns a black screen and some error: Error: Error: Assertion failed: file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-2.0.2/lib/src/firebase_core_web.dart:228:11 C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw_ C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3…

VIEW QUESTION
Back To Top
Search