@@ -45,18 +45,23 @@ class _EmailLinkSignInViewState extends State<EmailLinkSignInView> {
45
45
Widget build (BuildContext context) {
46
46
final l = FirebaseUILocalizations .labelsOf (context);
47
47
final formKey = GlobalKey <FormState >();
48
+ const statesToHideForm = [
49
+ AwaitingDynamicLink ,
50
+ SigningIn ,
51
+ ];
48
52
49
53
return AuthFlowBuilder <EmailLinkAuthController >(
50
54
auth: widget.auth,
51
55
provider: widget.provider,
52
56
builder: (context, state, ctrl, child) {
57
+ final isFormHidden = statesToHideForm.contains (state.runtimeType);
53
58
return Column (
54
59
mainAxisSize: MainAxisSize .min,
55
60
crossAxisAlignment: CrossAxisAlignment .stretch,
56
61
children: [
57
62
Title (text: l.signInWithEmailLinkViewTitleText),
58
63
const SizedBox (height: 16 ),
59
- if (state is ! AwaitingDynamicLink )
64
+ if (! isFormHidden )
60
65
Form (
61
66
key: formKey,
62
67
child: EmailInput (
@@ -74,7 +79,7 @@ class _EmailLinkSignInViewState extends State<EmailLinkSignInView> {
74
79
Text (l.signInWithEmailLinkSentText),
75
80
const SizedBox (height: 16 ),
76
81
],
77
- if (state is ! AwaitingDynamicLink ) ...[
82
+ if (! isFormHidden ) ...[
78
83
const SizedBox (height: 8 ),
79
84
LoadingButton (
80
85
isLoading: state is SendingLink ,
0 commit comments