|
| 1 | +import 'dart:math' as math; |
1 | 2 | import 'package:flutter/material.dart';
|
2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart';
|
3 | 4 |
|
@@ -41,21 +42,22 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
41 | 42 | @override
|
42 | 43 | Widget build(BuildContext context) {
|
43 | 44 | return Scaffold(
|
44 |
| - appBar: AppBar( |
45 |
| - title: Text(context.l10n.loginTitle), |
46 |
| - ), |
| 45 | + appBar: AppBar(), |
| 46 | + resizeToAvoidBottomInset: true, |
47 | 47 | body: SingleChildScrollView(
|
48 | 48 | padding: const EdgeInsets.all(16.0),
|
49 | 49 | child: Form(
|
50 | 50 | key: _formKey,
|
51 | 51 | autovalidateMode: AutovalidateMode.onUserInteraction,
|
52 | 52 | child: Column(
|
| 53 | + crossAxisAlignment: CrossAxisAlignment.start, |
53 | 54 | children: [
|
54 |
| - Row( |
55 |
| - mainAxisAlignment: MainAxisAlignment.center, |
56 |
| - children: [ |
57 |
| - Text(context.l10n.loginSlogan), |
58 |
| - ], |
| 55 | + Padding( |
| 56 | + padding: const EdgeInsets.symmetric(vertical: 32.0), |
| 57 | + child: Text( |
| 58 | + context.l10n.loginSlogan, |
| 59 | + style: context.textTheme.headline6, |
| 60 | + ), |
59 | 61 | ),
|
60 | 62 | const Gap.v(16),
|
61 | 63 | TextFormField(
|
@@ -102,22 +104,33 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
102 | 104 | ),
|
103 | 105 | ),
|
104 | 106 | const Gap.v(8),
|
105 |
| - Row( |
106 |
| - children: [ |
107 |
| - TextButton( |
108 |
| - onPressed: () { |
109 |
| - showToast('Comming soon'); |
110 |
| - }, |
111 |
| - child: Text(context.l10n.linkSignUp), |
112 |
| - ), |
113 |
| - const Spacer(), |
114 |
| - TextButton( |
115 |
| - onPressed: () { |
116 |
| - showToast('Comming soon'); |
117 |
| - }, |
118 |
| - child: Text(context.l10n.linkRetrieve), |
119 |
| - ), |
120 |
| - ], |
| 107 | + ], |
| 108 | + ), |
| 109 | + ), |
| 110 | + ), |
| 111 | + bottomNavigationBar: SafeArea( |
| 112 | + child: AnimatedPadding( |
| 113 | + duration: const Duration(milliseconds: 200), |
| 114 | + curve: Curves.easeOutQuart, |
| 115 | + padding: EdgeInsets.only( |
| 116 | + left: 16.0, |
| 117 | + right: 16, |
| 118 | + bottom: math.max(16, context.bottomViewInsets), |
| 119 | + ), |
| 120 | + child: Row( |
| 121 | + children: [ |
| 122 | + TextButton( |
| 123 | + onPressed: () { |
| 124 | + showToast('Comming soon'); |
| 125 | + }, |
| 126 | + child: Text(context.l10n.linkSignUp), |
| 127 | + ), |
| 128 | + const Spacer(), |
| 129 | + TextButton( |
| 130 | + onPressed: () { |
| 131 | + showToast('Comming soon'); |
| 132 | + }, |
| 133 | + child: Text(context.l10n.linkRetrieve), |
121 | 134 | ),
|
122 | 135 | ],
|
123 | 136 | ),
|
|
0 commit comments