Skip to content

Commit 097ebbf

Browse files
committed
login page
1 parent e6bf5c2 commit 097ebbf

File tree

1 file changed

+37
-24
lines changed

1 file changed

+37
-24
lines changed

lib/pages/login/login.dart

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'dart:math' as math;
12
import 'package:flutter/material.dart';
23
import 'package:flutter_riverpod/flutter_riverpod.dart';
34

@@ -41,21 +42,22 @@ class _LoginPageState extends ConsumerState<LoginPage> {
4142
@override
4243
Widget build(BuildContext context) {
4344
return Scaffold(
44-
appBar: AppBar(
45-
title: Text(context.l10n.loginTitle),
46-
),
45+
appBar: AppBar(),
46+
resizeToAvoidBottomInset: true,
4747
body: SingleChildScrollView(
4848
padding: const EdgeInsets.all(16.0),
4949
child: Form(
5050
key: _formKey,
5151
autovalidateMode: AutovalidateMode.onUserInteraction,
5252
child: Column(
53+
crossAxisAlignment: CrossAxisAlignment.start,
5354
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+
),
5961
),
6062
const Gap.v(16),
6163
TextFormField(
@@ -102,22 +104,33 @@ class _LoginPageState extends ConsumerState<LoginPage> {
102104
),
103105
),
104106
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),
121134
),
122135
],
123136
),

0 commit comments

Comments
 (0)