Skip to content

Commit a7dfef8

Browse files
committed
task: refractoring auth
1 parent f537cc8 commit a7dfef8

8 files changed

+80
-79
lines changed

assets/fonts/Roboto-Bold.ttf

163 KB
Binary file not shown.

assets/fonts/Roboto-Regular.ttf

164 KB
Binary file not shown.

assets/fonts/Roboto-Thin.ttf

165 KB
Binary file not shown.

assets/images/empty.png

22.7 KB
Loading

assets/images/filter.png

1.96 KB
Loading

assets/images/profile.png

11.5 KB
Loading
+78-77
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,98 @@
11
import 'package:flutter/material.dart';
2-
2+
import 'package:flutter/services.dart';
33
import '../../constants/colors.dart';
44

5+
enum Field {
6+
fullname,
7+
email,
8+
password,
9+
}
10+
511
class CustomerLandingScreen extends StatelessWidget {
612
const CustomerLandingScreen({Key? key}) : super(key: key);
713

814
@override
915
Widget build(BuildContext context) {
10-
Widget kContainer(
11-
IconData icon,
12-
) {
13-
return Container(
14-
height: 50,
15-
width: 50,
16-
decoration: const BoxDecoration(
17-
color: primaryColor,
18-
borderRadius: BorderRadius.only(
19-
topLeft: Radius.circular(20),
20-
topRight: Radius.circular(20),
21-
),
22-
),
23-
child: Center(
24-
child: Icon(
25-
icon,
26-
),
27-
),
28-
);
29-
}
16+
SystemChrome.setSystemUIOverlayStyle(
17+
const SystemUiOverlayStyle(
18+
statusBarColor: Colors.transparent,
19+
),
20+
);
3021

3122
return Scaffold(
32-
body: Column(
33-
mainAxisAlignment: MainAxisAlignment.center,
34-
children: [
35-
Row(
36-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
37-
children: const [
38-
Text('Create Customer Account'),
39-
Icon(Icons.person, color: primaryColor),
40-
],
41-
),
42-
const SizedBox(height: 20),
43-
Row(
44-
children: [
45-
const CircleAvatar(
46-
radius: 60,
47-
backgroundColor: primaryColor,
48-
child: Center(
49-
child: Icon(
50-
Icons.image_sharp,
23+
body: Padding(
24+
padding: const EdgeInsets.all(18.0),
25+
child: Column(
26+
mainAxisAlignment: MainAxisAlignment.center,
27+
children: [
28+
Row(
29+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
30+
children: const [
31+
Text(
32+
'Register as a customer',
33+
style: TextStyle(
34+
fontSize: 25,
35+
fontWeight: FontWeight.w500,
5136
),
5237
),
53-
),
54-
const SizedBox(width: 15),
55-
Column(
56-
children: [
57-
Container(
58-
height: 50,
59-
width: 50,
60-
decoration: const BoxDecoration(
61-
color: primaryColor,
62-
borderRadius: BorderRadius.only(
63-
topLeft: Radius.circular(20),
64-
topRight: Radius.circular(20),
38+
Icon(Icons.person, color: primaryColor, size: 35),
39+
],
40+
),
41+
const SizedBox(height: 20),
42+
Row(
43+
children: [
44+
CircleAvatar(
45+
radius: 60,
46+
backgroundColor: primaryColor,
47+
child: Center(
48+
child: Image.asset('assets/images/profile.png',
49+
color: Colors.white)),
50+
),
51+
const SizedBox(width: 15),
52+
Column(
53+
children: [
54+
Container(
55+
height: 50,
56+
width: 50,
57+
decoration: const BoxDecoration(
58+
color: primaryColor,
59+
borderRadius: BorderRadius.only(
60+
topLeft: Radius.circular(20),
61+
topRight: Radius.circular(20),
62+
),
6563
),
66-
),
67-
child: const Center(
68-
child: Icon(
69-
Icons.photo,
64+
child: const Center(
65+
child: Icon(
66+
Icons.photo,
67+
color: Colors.white,
68+
),
7069
),
7170
),
72-
),
73-
const SizedBox(height: 10),
74-
Container(
75-
height: 50,
76-
width: 50,
77-
decoration: const BoxDecoration(
78-
color: primaryColor,
79-
borderRadius: BorderRadius.only(
80-
bottomLeft: Radius.circular(20),
81-
bottomRight: Radius.circular(20),
71+
const SizedBox(height: 10),
72+
Container(
73+
height: 50,
74+
width: 50,
75+
decoration: const BoxDecoration(
76+
color: primaryColor,
77+
borderRadius: BorderRadius.only(
78+
bottomLeft: Radius.circular(20),
79+
bottomRight: Radius.circular(20),
80+
),
8281
),
83-
),
84-
child: const Center(
85-
child: Icon(
86-
Icons.camera_alt_rounded,
82+
child: const Center(
83+
child: Icon(
84+
Icons.camera_alt_rounded,
85+
color: Colors.white,
86+
),
8787
),
88-
),
89-
)
90-
],
91-
)
92-
],
93-
)
94-
],
88+
)
89+
],
90+
)
91+
],
92+
),
93+
const SizedBox(height: 20),
94+
],
95+
),
9596
));
9697
}
9798
}

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ flutter:
5858
uses-material-design: true
5959

6060
# To add assets to your application, add an assets section, like this:
61-
# assets:
62-
# - images/a_dot_burr.jpeg
61+
assets:
62+
- assets/images/
6363
# - images/a_dot_ham.jpeg
6464

6565
# An image asset can refer to one or more resolution-specific "variants", see

0 commit comments

Comments
 (0)