From 6bd9cea7c071bc5b19ebe24acdab12fa1698ffae Mon Sep 17 00:00:00 2001 From: Arseniy Date: Fri, 20 Aug 2021 16:00:11 +0300 Subject: [PATCH] fix: update register exception catcher --- lib/src/infrastructure/firebase_auth_facade.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/infrastructure/firebase_auth_facade.dart b/lib/src/infrastructure/firebase_auth_facade.dart index f195957..6216895 100644 --- a/lib/src/infrastructure/firebase_auth_facade.dart +++ b/lib/src/infrastructure/firebase_auth_facade.dart @@ -93,8 +93,8 @@ class FirebaseAuthFacade implements AuthFacade { password: password, ); return const Auth.success(); - } on PlatformException catch (e) { - if (e.code == 'ERROR_EMAIL_ALREADY_IN_USE') { + } on FirebaseAuthException catch (e) { + if (e.code == 'email-already-in-use') { return const Auth.failure(AuthFailure.emailAlreadyInUse()); } else { debugPrint(e.toString());