-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathsignup_screen.dart
108 lines (103 loc) · 3.9 KB
/
signup_screen.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'components/sign_up_form.dart';
import '../../../route/route_constants.dart';
import '../../../constants.dart';
class SignUpScreen extends StatefulWidget {
const SignUpScreen({super.key});
@override
State<SignUpScreen> createState() => _SignUpScreenState();
}
class _SignUpScreenState extends State<SignUpScreen> {
final _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
Image.asset(
"assets/images/signUp_dark.png",
height: MediaQuery.of(context).size.height * 0.35,
width: double.infinity,
fit: BoxFit.cover,
),
Padding(
padding: const EdgeInsets.all(defaultPadding),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Let’s get started!",
style: Theme.of(context).textTheme.headlineSmall,
),
const SizedBox(height: defaultPadding / 2),
const Text(
"Please enter your valid data in order to create an account.",
),
const SizedBox(height: defaultPadding),
SignUpForm(formKey: _formKey),
const SizedBox(height: defaultPadding),
Row(
children: [
Checkbox(
onChanged: (value) {},
value: false,
),
Expanded(
child: Text.rich(
TextSpan(
text: "I agree with the",
children: [
TextSpan(
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.pushNamed(
context, termsOfServicesScreenRoute);
},
text: " Terms of service ",
style: const TextStyle(
color: primaryColor,
fontWeight: FontWeight.w500,
),
),
const TextSpan(
text: "& privacy policy.",
),
],
),
),
)
],
),
const SizedBox(height: defaultPadding * 2),
ElevatedButton(
onPressed: () {
// There is 2 more screens while user complete their profile
// afre sign up, it's available on the pro version get it now
// 🔗 https://theflutterway.gumroad.com/l/fluttershop
Navigator.pushNamed(context, entryPointScreenRoute);
},
child: const Text("Continue"),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text("Do you have an account?"),
TextButton(
onPressed: () {
Navigator.pushNamed(context, logInScreenRoute);
},
child: const Text("Log in"),
)
],
),
],
),
)
],
),
),
);
}
}