Skip to content

Commit 3d2651f

Browse files
committed
Add edit customer screen
1 parent 8ac46e2 commit 3d2651f

File tree

2 files changed

+235
-1
lines changed

2 files changed

+235
-1
lines changed

lib/basic.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:basic/classes/size_units_class.dart';
22
import 'package:basic/constants/color_constants.dart';
33
import 'package:basic/constants/textstyle_constants.dart';
4+
import 'package:basic/screens/edit/edit_customer_screen.dart';
45
import 'package:basic/screens/edit/edit_item_screen.dart';
56
import 'package:basic/screens/edit/edit_product_screen.dart';
67
import 'package:basic/screens/edit/edit_service1_screen.dart';
@@ -62,7 +63,7 @@ class Basic extends StatelessWidget {
6263
primaryColor: primaryColor,
6364
scaffoldBackgroundColor: desaturatedGreyColor,
6465
),
65-
home: NewService1Screen(),
66+
home: EditCustomerScreen(),
6667
debugShowCheckedModeBanner: false,
6768
);
6869
}
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
import 'package:basic/Enums/button_size_enums.dart';
2+
import 'package:basic/constants/color_constants.dart';
3+
import 'package:basic/constants/textstyle_constants.dart';
4+
import 'package:basic/screens/edit/edit_service_screen.dart';
5+
import 'package:basic/screens/upload/upload_product_screen.dart';
6+
import 'package:basic/widgets/button_widget.dart';
7+
import 'package:flutter/material.dart';
8+
import 'package:flutter/services.dart';
9+
10+
class EditCustomerScreen extends StatelessWidget {
11+
const EditCustomerScreen({Key? key}) : super(key: key);
12+
13+
@override
14+
Widget build(BuildContext context) {
15+
SystemChrome.setEnabledSystemUIOverlays([
16+
SystemUiOverlay.top,
17+
SystemUiOverlay.bottom,
18+
]);
19+
20+
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
21+
statusBarColor: primaryColor,
22+
statusBarBrightness: Brightness.dark,
23+
systemNavigationBarIconBrightness: Brightness.dark,
24+
statusBarIconBrightness: Brightness.light,
25+
systemNavigationBarColor: desaturatedGreyColor,
26+
));
27+
28+
return Scaffold(
29+
appBar: AppBar(
30+
brightness: Brightness.dark,
31+
backgroundColor: primaryColor,
32+
title: Row(
33+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
34+
children: [
35+
FittedBox(
36+
child: InkWell(
37+
onTap: () {
38+
Navigator.of(context).pop();
39+
},
40+
child: Container(
41+
padding: EdgeInsets.symmetric(
42+
vertical: 10,
43+
horizontal: 10,
44+
),
45+
decoration: BoxDecoration(
46+
color: lightWhiteColor,
47+
borderRadius: BorderRadius.all(Radius.circular(10))),
48+
child: Row(
49+
children: [
50+
Icon(
51+
Icons.arrow_back_ios,
52+
size: 17,
53+
),
54+
SizedBox(width: 15),
55+
Text(
56+
'Return',
57+
style: labelBoldTextStyle,
58+
),
59+
],
60+
),
61+
),
62+
),
63+
),
64+
FittedBox(
65+
child: InkWell(
66+
onTap: () {
67+
Navigator.of(context)
68+
.push(MaterialPageRoute(builder: (BuildContext ctx) {
69+
return UploadProductScreen();
70+
}));
71+
},
72+
child: Container(
73+
padding: EdgeInsets.symmetric(
74+
vertical: 10,
75+
horizontal: 10,
76+
),
77+
decoration: BoxDecoration(
78+
color: lightWhiteColor,
79+
borderRadius: BorderRadius.all(Radius.circular(10))),
80+
child: Row(
81+
children: [
82+
Image.asset('images/edit_icon.png'),
83+
SizedBox(width: 15),
84+
Text(
85+
'Edit',
86+
style: labelBoldTextStyle,
87+
),
88+
],
89+
),
90+
),
91+
),
92+
),
93+
],
94+
),
95+
automaticallyImplyLeading: false,
96+
bottom: PreferredSize(
97+
child: Container(
98+
margin: EdgeInsets.only(
99+
left: 20,
100+
bottom: 20,
101+
),
102+
child: Align(
103+
alignment: Alignment.topLeft,
104+
child: Text(
105+
'Michelle manga',
106+
style: h6TextStyle.merge(TextStyle(color: whiteColor)),
107+
),
108+
),
109+
),
110+
preferredSize: Size.fromHeight(60),
111+
),
112+
),
113+
body: SingleChildScrollView(
114+
child: Container(
115+
padding: EdgeInsets.all(20),
116+
child: Column(
117+
children: [
118+
Container(
119+
width: double.infinity,
120+
padding: EdgeInsets.symmetric(
121+
vertical: 20,
122+
horizontal: 20,
123+
),
124+
decoration: BoxDecoration(
125+
color: whiteColor,
126+
borderRadius: BorderRadius.all(Radius.circular(20)),
127+
),
128+
child: Text(
129+
'Michelle Manga',
130+
style: bodyTextStyle,
131+
),
132+
),
133+
SizedBox(height: 10),
134+
Container(
135+
width: double.infinity,
136+
padding: EdgeInsets.symmetric(
137+
vertical: 20,
138+
horizontal: 20,
139+
),
140+
decoration: BoxDecoration(
141+
color: whiteColor,
142+
borderRadius: BorderRadius.all(Radius.circular(20)),
143+
),
144+
child: Text(
145+
'+237 650434343',
146+
style: bodyTextStyle,
147+
),
148+
),
149+
SizedBox(height: 10),
150+
Container(
151+
width: double.infinity,
152+
padding: EdgeInsets.symmetric(
153+
vertical: 20,
154+
horizontal: 20,
155+
),
156+
decoration: BoxDecoration(
157+
color: whiteColor,
158+
borderRadius: BorderRadius.all(Radius.circular(20)),
159+
),
160+
child: Text(
161+
'Cameroon',
162+
style: bodyTextStyle,
163+
),
164+
),
165+
SizedBox(height: 10),
166+
Container(
167+
width: double.infinity,
168+
padding: EdgeInsets.symmetric(
169+
vertical: 20,
170+
horizontal: 20,
171+
),
172+
decoration: BoxDecoration(
173+
color: whiteColor,
174+
borderRadius: BorderRadius.all(Radius.circular(20)),
175+
),
176+
child: Text(
177+
'Littoral',
178+
style: bodyTextStyle,
179+
),
180+
),
181+
SizedBox(height: 10),
182+
Container(
183+
width: double.infinity,
184+
padding: EdgeInsets.symmetric(
185+
vertical: 20,
186+
horizontal: 20,
187+
),
188+
decoration: BoxDecoration(
189+
color: whiteColor,
190+
borderRadius: BorderRadius.all(Radius.circular(20)),
191+
),
192+
child: Text(
193+
'Douala',
194+
style: bodyTextStyle,
195+
),
196+
),
197+
SizedBox(height: 10),
198+
Container(
199+
width: double.infinity,
200+
padding: EdgeInsets.symmetric(
201+
vertical: 20,
202+
horizontal: 20,
203+
),
204+
decoration: BoxDecoration(
205+
color: whiteColor,
206+
borderRadius: BorderRadius.all(Radius.circular(20)),
207+
),
208+
child: Text(
209+
'Bali',
210+
style: bodyTextStyle,
211+
),
212+
),
213+
SizedBox(height: 20),
214+
],
215+
),
216+
),
217+
),
218+
persistentFooterButtons: [
219+
Container(
220+
padding: EdgeInsets.all(10),
221+
color: desaturatedGreyColor,
222+
child: ButtonWidget(
223+
backgroundColor: lightRedColor!,
224+
loading: false,
225+
onTap: () {},
226+
size: ButtonSize.big,
227+
text: 'Delete customer',
228+
textColor: redColor!,
229+
)),
230+
],
231+
);
232+
}
233+
}

0 commit comments

Comments
 (0)