File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ class _SupaEmailAuthState extends State<SupaEmailAuth> {
494494 height: 16 ,
495495 width: 16 ,
496496 child: CircularProgressIndicator (
497- color: Theme .of (context).colorScheme.surface ,
497+ color: Theme .of (context).colorScheme.primary ,
498498 strokeWidth: 1.5 ,
499499 ),
500500 )
@@ -559,6 +559,9 @@ class _SupaEmailAuthState extends State<SupaEmailAuth> {
559559 setState (() {
560560 _isLoading = true ;
561561 });
562+
563+ await Future .delayed (Duration (milliseconds: 50 ));
564+
562565 try {
563566 if (_isSigningIn) {
564567 final response = await supabase.auth.signInWithPassword (
@@ -605,11 +608,12 @@ class _SupaEmailAuthState extends State<SupaEmailAuth> {
605608 widget.onError? .call (error);
606609 }
607610 _emailFocusNode.requestFocus ();
608- }
609- if (mounted) {
610- setState (() {
611- _isLoading = false ;
612- });
611+ } finally {
612+ if (mounted) {
613+ setState (() {
614+ _isLoading = false ;
615+ });
616+ }
613617 }
614618 }
615619
You can’t perform that action at this time.
0 commit comments