Skip to content

Commit e57ce3f

Browse files
committed
Add item 1 expense screen
1 parent 154aab4 commit e57ce3f

File tree

2 files changed

+256
-1
lines changed

2 files changed

+256
-1
lines changed

lib/basic.dart

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

0 commit comments

Comments
 (0)