Skip to content

Commit 1c2735e

Browse files
committed
Add expense service edit screen
1 parent 38e2754 commit 1c2735e

13 files changed

+534
-60
lines changed

lib/basic.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Basic extends StatelessWidget {
7171
primaryColor: primaryColor,
7272
scaffoldBackgroundColor: desaturatedGreyColor,
7373
),
74-
home: MoreScreen(),
74+
home: MainScreen(),
7575
debugShowCheckedModeBanner: false,
7676
);
7777
}

lib/screens/edit/edit_customer_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:basic/Enums/button_size_enums.dart';
22
import 'package:basic/constants/color_constants.dart';
33
import 'package:basic/constants/textstyle_constants.dart';
44
import 'package:basic/screens/edit/edit_service_screen.dart';
5+
import 'package:basic/screens/upload/upload_customer_screen.dart';
56
import 'package:basic/screens/upload/upload_product_screen.dart';
67
import 'package:basic/widgets/button_widget.dart';
78
import 'package:flutter/material.dart';
@@ -66,7 +67,7 @@ class EditCustomerScreen extends StatelessWidget {
6667
onTap: () {
6768
Navigator.of(context)
6869
.push(MaterialPageRoute(builder: (BuildContext ctx) {
69-
return UploadProductScreen();
70+
return UploadCustomerScreen();
7071
}));
7172
},
7273
child: Container(

lib/screens/edit/edit_expense_screen.dart

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

lib/screens/edit/edit_item_screen.dart

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import 'package:basic/Enums/button_size_enums.dart';
22
import 'package:basic/classes/spacing_class.dart';
33
import 'package:basic/constants/color_constants.dart';
44
import 'package:basic/constants/textstyle_constants.dart';
5+
import 'package:basic/screens/edit/edit_service1_screen.dart';
56
import 'package:basic/screens/edit/edit_service_screen.dart';
7+
import 'package:basic/screens/new/new_item_screen.dart';
8+
import 'package:basic/screens/upload/upload_item_screen.dart';
69
import 'package:basic/screens/upload/upload_product_screen.dart';
710
import 'package:basic/widgets/appbar_button_widget.dart';
811
import 'package:basic/widgets/button_widget.dart';
@@ -40,14 +43,21 @@ class EditItemScreen extends StatelessWidget {
4043
size: 17,
4144
),
4245
isIconSameSize: false,
43-
onTap: () {},
46+
onTap: () {
47+
Navigator.of(context).pop();
48+
},
4449
size: ButtonSize.small,
4550
text: 'Return',
4651
),
4752
AppBarButtonWidget(
4853
icon: Image.asset('images/edit_icon.png'),
4954
isIconSameSize: true,
50-
onTap: () {},
55+
onTap: () {
56+
Navigator.of(context)
57+
.push(MaterialPageRoute(builder: (BuildContext ctx) {
58+
return UploadItemScreen();
59+
}));
60+
},
5161
size: ButtonSize.small,
5262
text: 'Edit',
5363
),
@@ -170,7 +180,12 @@ class EditItemScreen extends StatelessWidget {
170180
child: ButtonWidget(
171181
backgroundColor: lightRedColor!,
172182
loading: false,
173-
onTap: () {},
183+
onTap: () {
184+
Navigator.of(context)
185+
.push(MaterialPageRoute(builder: (BuildContext ctx) {
186+
return EditService1Screen();
187+
}));
188+
},
174189
size: ButtonSize.big,
175190
text: 'Delete product',
176191
textColor: redColor!,

lib/screens/edit/edit_service1_screen.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:basic/constants/color_constants.dart';
44
import 'package:basic/constants/textstyle_constants.dart';
55
import 'package:basic/screens/edit/edit_service_screen.dart';
66
import 'package:basic/screens/upload/upload_product_screen.dart';
7+
import 'package:basic/screens/upload/upload_service1_screen.dart';
78
import 'package:basic/widgets/appbar_button_widget.dart';
89
import 'package:basic/widgets/button_widget.dart';
910
import 'package:flutter/material.dart';
@@ -40,14 +41,21 @@ class EditService1Screen extends StatelessWidget {
4041
size: 17,
4142
),
4243
isIconSameSize: false,
43-
onTap: () {},
44+
onTap: () {
45+
Navigator.of(context).pop();
46+
},
4447
size: ButtonSize.small,
4548
text: 'Return',
4649
),
4750
AppBarButtonWidget(
4851
icon: Image.asset('images/edit_icon.png'),
4952
isIconSameSize: true,
50-
onTap: () {},
53+
onTap: () {
54+
Navigator.of(context)
55+
.push(MaterialPageRoute(builder: (BuildContext ctx) {
56+
return UploadService1Screen();
57+
}));
58+
},
5159
size: ButtonSize.small,
5260
text: 'Edit',
5361
),

0 commit comments

Comments
 (0)