@@ -26,46 +26,50 @@ class LoginScreenState extends State<LoginScreen> {
26
26
Widget build (BuildContext context) {
27
27
return ProviderWidget <LoginViewModel >(
28
28
create: () => getIt ()..init (),
29
- consumerWithThemeAndLocalization: (context, viewModel, child, theme, localization) => BaseScreen (
30
- showHeader: false ,
31
- children: [
32
- Container (height: 16 ),
33
- Text (
34
- 'Login' ,
35
- style: theme.text.titleNormal,
36
- textAlign: TextAlign .center,
37
- ),
38
- Container (height: 32 ),
39
- Text (
40
- 'Just fill in some text. There is no validator for the login' ,
41
- style: theme.text.labelButtonSmall,
42
- ),
43
- Container (height: 32 ),
44
- FlutterTemplateInputField (
45
- key: Keys .emailInput,
46
- enabled: ! viewModel.isLoading,
47
- onChanged: viewModel.onEmailUpdated,
48
- hint: 'Email' ,
49
- ),
50
- Container (height: 16 ),
51
- FlutterTemplateInputField (
52
- key: Keys .passwordInput,
53
- enabled: ! viewModel.isLoading,
54
- onChanged: viewModel.onPasswordUpdated,
55
- hint: 'Password' ,
56
- ),
57
- Container (height: 16 ),
58
- if (viewModel.isLoading) ...[
59
- const FlutterTemplateProgressIndicator .light (),
60
- ] else ...[
61
- FlutterTemplateButton (
62
- key: Keys .loginButton,
63
- isEnabled: viewModel.isLoginEnabled,
64
- text: 'Login' ,
65
- onClick: viewModel.onLoginClicked,
29
+ consumerWithThemeAndLocalization: (context, viewModel, child, theme, localization) => AutofillGroup (
30
+ child: BaseScreen (
31
+ showHeader: false ,
32
+ children: [
33
+ Container (height: 16 ),
34
+ Text (
35
+ 'Login' ,
36
+ style: theme.text.titleNormal,
37
+ textAlign: TextAlign .center,
66
38
),
39
+ Container (height: 32 ),
40
+ Text (
41
+ 'Just fill in some text. There is no validator for the login' ,
42
+ style: theme.text.labelButtonSmall,
43
+ ),
44
+ Container (height: 32 ),
45
+ FlutterTemplateInputField (
46
+ key: Keys .emailInput,
47
+ enabled: ! viewModel.isLoading,
48
+ onChanged: viewModel.onEmailUpdated,
49
+ hint: 'Email' ,
50
+ autoFillHints: const [AutofillHints .email],
51
+ ),
52
+ Container (height: 16 ),
53
+ FlutterTemplateInputField (
54
+ key: Keys .passwordInput,
55
+ enabled: ! viewModel.isLoading,
56
+ onChanged: viewModel.onPasswordUpdated,
57
+ hint: 'Password' ,
58
+ autoFillHints: const [AutofillHints .password],
59
+ ),
60
+ Container (height: 16 ),
61
+ if (viewModel.isLoading) ...[
62
+ const FlutterTemplateProgressIndicator .light (),
63
+ ] else ...[
64
+ FlutterTemplateButton (
65
+ key: Keys .loginButton,
66
+ isEnabled: viewModel.isLoginEnabled,
67
+ text: 'Login' ,
68
+ onClick: viewModel.onLoginClicked,
69
+ ),
70
+ ],
67
71
],
68
- ] ,
72
+ ) ,
69
73
),
70
74
);
71
75
}
0 commit comments