Skip to content

Commit 8ac46e2

Browse files
committed
Add new service1 screen
1 parent d3ff54e commit 8ac46e2

File tree

3 files changed

+474
-1
lines changed

3 files changed

+474
-1
lines changed

lib/basic.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ import 'package:basic/screens/auth/setup_account_screen.dart';
1212
import 'package:basic/screens/auth/verify_number_screen.dart';
1313
import 'package:basic/screens/dashboard/dashboard_screen.dart';
1414
import 'package:basic/screens/main/main_screen.dart';
15+
import 'package:basic/screens/new/new_item_screen.dart';
1516
import 'package:basic/screens/new/new_product_screen.dart';
17+
import 'package:basic/screens/new/new_service1_screen.dart';
1618
import 'package:basic/screens/new/new_service_screen.dart';
1719
import 'package:basic/screens/sales/sales_screen.dart';
1820
import 'package:basic/screens/upload/upload_item_screen.dart';
1921
import 'package:basic/screens/upload/upload_product_screen.dart';
22+
import 'package:basic/screens/upload/upload_service1_screen.dart';
2023
import 'package:basic/screens/upload/upload_service_screen.dart';
2124
import 'package:flutter/material.dart';
2225

@@ -59,7 +62,7 @@ class Basic extends StatelessWidget {
5962
primaryColor: primaryColor,
6063
scaffoldBackgroundColor: desaturatedGreyColor,
6164
),
62-
home: UploadItemScreen(),
65+
home: NewService1Screen(),
6366
debugShowCheckedModeBanner: false,
6467
);
6568
}
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
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/widgets/button_widget.dart';
5+
import 'package:flutter/material.dart';
6+
import 'package:flutter/services.dart';
7+
8+
class NewItemScreen extends StatelessWidget {
9+
const NewItemScreen({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: FittedBox(
31+
child: InkWell(
32+
onTap: () {
33+
Navigator.of(context).pop();
34+
},
35+
child: Container(
36+
padding: EdgeInsets.symmetric(
37+
vertical: 10,
38+
horizontal: 10,
39+
),
40+
decoration: BoxDecoration(
41+
color: lightWhiteColor,
42+
borderRadius: BorderRadius.all(Radius.circular(10))),
43+
child: Row(
44+
children: [
45+
Icon(
46+
Icons.arrow_back_ios,
47+
size: 17,
48+
),
49+
SizedBox(width: 15),
50+
Text(
51+
'Return',
52+
style: labelBoldTextStyle,
53+
),
54+
],
55+
),
56+
),
57+
),
58+
),
59+
automaticallyImplyLeading: false,
60+
bottom: PreferredSize(
61+
child: Container(
62+
margin: EdgeInsets.only(
63+
left: 20,
64+
bottom: 20,
65+
),
66+
child: Align(
67+
alignment: Alignment.topLeft,
68+
child: Text(
69+
'Add a new item',
70+
style: h6TextStyle.merge(TextStyle(color: whiteColor)),
71+
),
72+
),
73+
),
74+
preferredSize: Size.fromHeight(60),
75+
),
76+
),
77+
body: SingleChildScrollView(
78+
child: Container(
79+
padding: EdgeInsets.all(20),
80+
child: Column(
81+
children: [
82+
Container(
83+
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 20),
84+
height: 60,
85+
decoration: BoxDecoration(
86+
color: whiteColor,
87+
borderRadius: BorderRadius.all(
88+
Radius.circular(20),
89+
),
90+
),
91+
child: SizedBox(
92+
width: double.infinity,
93+
child: DropdownButtonHideUnderline(
94+
child: DropdownButton(
95+
style:
96+
bodyTextStyle.merge(TextStyle(color: primaryColor)),
97+
hint: Text(
98+
'Product',
99+
style:
100+
bodyTextStyle.merge(TextStyle(color: primaryColor)),
101+
),
102+
onChanged: (String? t) {},
103+
icon: Padding(
104+
padding: const EdgeInsets.only(
105+
left: 10,
106+
bottom: 5,
107+
),
108+
child: RotatedBox(
109+
quarterTurns: 3,
110+
child: Icon(
111+
Icons.arrow_back_ios,
112+
size: 16,
113+
color: primaryColor,
114+
),
115+
),
116+
),
117+
items: [
118+
DropdownMenuItem(
119+
value: 'Buea',
120+
child: Text('Buea'),
121+
),
122+
],
123+
),
124+
),
125+
),
126+
),
127+
SizedBox(height: 10),
128+
Container(
129+
padding: EdgeInsets.symmetric(
130+
vertical: 20,
131+
horizontal: 20,
132+
),
133+
height: 60,
134+
decoration: BoxDecoration(
135+
color: whiteColor,
136+
borderRadius: BorderRadius.all(
137+
Radius.circular(20),
138+
),
139+
),
140+
child: TextField(
141+
// maxLength: 3,
142+
keyboardType: TextInputType.number,
143+
decoration: InputDecoration(
144+
hintText: 'Product name',
145+
hintStyle:
146+
bodyTextStyle.merge(TextStyle(color: primaryColor)),
147+
contentPadding: EdgeInsets.symmetric(vertical: 8),
148+
enabledBorder: InputBorder.none,
149+
),
150+
),
151+
),
152+
SizedBox(height: 10),
153+
Row(
154+
children: [
155+
Expanded(
156+
child: Container(
157+
padding: EdgeInsets.symmetric(
158+
vertical: 20,
159+
horizontal: 20,
160+
),
161+
height: 60,
162+
decoration: BoxDecoration(
163+
color: whiteColor,
164+
borderRadius: BorderRadius.all(
165+
Radius.circular(20),
166+
),
167+
),
168+
child: TextField(
169+
// maxLength: 3,
170+
keyboardType: TextInputType.number,
171+
decoration: InputDecoration(
172+
hintText: 'Unit price',
173+
hintStyle: bodyTextStyle
174+
.merge(TextStyle(color: primaryColor)),
175+
contentPadding: EdgeInsets.symmetric(vertical: 8),
176+
enabledBorder: InputBorder.none,
177+
),
178+
),
179+
),
180+
),
181+
SizedBox(width: 10),
182+
Container(
183+
width: 80,
184+
padding: EdgeInsets.symmetric(
185+
vertical: 20,
186+
horizontal: 20,
187+
),
188+
height: 60,
189+
decoration: BoxDecoration(
190+
color: whiteColor,
191+
borderRadius: BorderRadius.all(
192+
Radius.circular(20),
193+
),
194+
),
195+
child: TextField(
196+
// maxLength: 3,
197+
keyboardType: TextInputType.number,
198+
decoration: InputDecoration(
199+
hintText: 'Qty',
200+
hintStyle:
201+
bodyTextStyle.merge(TextStyle(color: primaryColor)),
202+
contentPadding: EdgeInsets.symmetric(vertical: 8),
203+
enabledBorder: InputBorder.none,
204+
),
205+
),
206+
),
207+
],
208+
),
209+
SizedBox(height: 10),
210+
Container(
211+
padding: EdgeInsets.symmetric(
212+
vertical: 20,
213+
horizontal: 20,
214+
),
215+
height: 60,
216+
decoration: BoxDecoration(
217+
color: whiteColor,
218+
borderRadius: BorderRadius.all(
219+
Radius.circular(20),
220+
),
221+
),
222+
child: TextField(
223+
keyboardType: TextInputType.number,
224+
decoration: InputDecoration(
225+
hintText: 'Description',
226+
hintStyle:
227+
bodyTextStyle.merge(TextStyle(color: lightGreyColor)),
228+
contentPadding: EdgeInsets.symmetric(vertical: 8),
229+
enabledBorder: InputBorder.none,
230+
),
231+
),
232+
),
233+
SizedBox(height: 20),
234+
],
235+
),
236+
),
237+
),
238+
persistentFooterButtons: [
239+
Container(
240+
padding: EdgeInsets.all(10),
241+
color: desaturatedGreyColor,
242+
child: ButtonWidget(
243+
backgroundColor: accentColor!,
244+
loading: false,
245+
onTap: () {},
246+
size: ButtonSize.big,
247+
text: 'Save',
248+
textColor: whiteColor!,
249+
)),
250+
],
251+
);
252+
}
253+
}

0 commit comments

Comments
 (0)