Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
528df0d2
Commit
528df0d2
authored
May 14, 2025
by
Sai Srinivas
Browse files
14-05-2025 By Sai Srinivas
All UI Adjustments and Font Sizes
parent
fd946558
Changes
74
Show whitespace changes
Inline
Side-by-side
lib/screens/serviceEngineer/MonthlyCollection.dart
View file @
528df0d2
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/PaymentCollectionProvider.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/WebERPScreen.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -32,60 +33,39 @@ class _MonthlycollectionState extends State<Monthlycollection> {
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Paymentcollectionprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
title:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
,
),
),
Text
(
"Payment Collection"
,
style:
TextStyle
(
fontSize:
16
,
height:
1.1
,
color:
AppColors
.
semi_black
,
),
),
Spacer
(),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
var
sendWidget
=
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountsuggestions
(),
),
MaterialPageRoute
(
builder:
(
context
)
=>
Accountsuggestions
()),
);
if
(
res
==
true
){
provider
.
PaymentCollectionAPI
(
context
);
}
},
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
),
],
),
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
// Adjust the radius as needed
),
),
child:
SvgPicture
.
asset
(
"assets/svg/add_account.svg"
,
width:
20
,
color:
Color
(
0xFF2D2D2D
),
height:
20
,
),
body:
Container
(
);
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Payment Collection"
,
sendWidget
),
body:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
provider
.
paymenCollectionList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
...
...
@@ -102,27 +82,59 @@ class _MonthlycollectionState extends State<Monthlycollection> {
children:
[
Expanded
(
flex:
1
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
width:
30
,
height:
30
,
"assets/svg/se_block_head.svg"
,
),
),
SizedBox
(
width:
5
),
),
SizedBox
(
width:
10
),
Column
(
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.paymenCollectionList[index].accountName}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
Text
(
"₹
${provider.paymenCollectionList[index].amount}
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
),
// Text("Gen Pvt. Ltd"),
],
),
Spacer
(),
Expanded
(
flex:
2
,
),
),
Container
(
height:
35
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE3FFE0
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
Center
(
child:
Text
(
"₹
${provider.paymenCollectionList[index].amount}
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
"
${provider.paymenCollectionList[index].approvalStatus}
"
,
style:
TextStyle
(
fontSize:
13
,
color:
Color
(
0xFF0D9C00
)),
),
),
),
// Expanded(
...
...
@@ -136,7 +148,14 @@ class _MonthlycollectionState extends State<Monthlycollection> {
// ),
],
),
SizedBox
(
height:
10
),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
),
SizedBox
(
height:
5
),
...
List
.
generate
(
2
,
(
j
)
{
final
textheads
=
[
"ID"
,
"Generator Type"
];
final
textSubheads
=
[
...
...
@@ -148,43 +167,26 @@ class _MonthlycollectionState extends State<Monthlycollection> {
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
textSubheads
[
j
].
toString
()),
],
),
if
(
j
==
1
)
Container
(
height:
30
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE3FFE0
),
borderRadius:
BorderRadius
.
circular
(
8
),
Expanded
(
flex:
1
,
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
),
child:
Center
(
SizedBox
(
width:
5
),
Expanded
(
flex:
2
,
child:
Text
(
"
${provider.paymenCollectionList[index].approvalStatus}
"
,
textSubheads
[
j
].
toString
()
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
color:
Color
(
0xFF818181
),
),
),
),
],
),
if
(
j
==
0
)
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
],
),
);
...
...
@@ -213,7 +215,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
children:
[
Text
(
"View Attachment"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
),
...
...
@@ -226,6 +228,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
);
},
),
):
Emptywidget
(
context
),
),
);
},
...
...
lib/screens/serviceEngineer/NearbyGenerators.dart
View file @
528df0d2
...
...
@@ -101,7 +101,8 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
max:
100
,
divisions:
100
,
label:
provider
.
currentValue
.
toStringAsFixed
(
2
),
inactiveColor:
Colors
.
grey
,
inactiveColor:
Color
(
0xFFD7D7D7
),
activeColor:
AppColors
.
cyan_blue
,
onChanged:
(
value
)
{
provider
.
currentValue
=
value
;
provider
.
debounce
(()
{
...
...
@@ -109,16 +110,21 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
},
Duration
(
milliseconds:
500
));
},
),
Text
(
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
'Status'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
18.0
,
fontWeight:
FontWeight
.
w500
,
),
),
),
Container
(
width:
200
,
// Set the desired width here
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton
<
String
>(
value:
provider
.
selectedItem
,
items:
...
...
@@ -146,6 +152,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
.
black
,
// Remove the default dropdown icon
),
),
],
),
),
SizedBox
(
height:
30.0
),
Container
(
child:
InkWell
(
...
...
@@ -199,7 +208,10 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
child:
Icon
(
Icons
.
filter_alt_outlined
),
));
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Nearby Generators"
,
sendWidget
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
...
...
@@ -242,6 +254,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
),
),
),
),
);
},);
}
...
...
lib/screens/serviceEngineer/PCWallet.dart
View file @
528df0d2
...
...
@@ -30,7 +30,10 @@ class _PcwalletState extends State<Pcwallet> {
return
Consumer
<
Pcwalletprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
groupedData
=
provider
.
groupByDate
(
provider
.
historyList
);
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
...
...
@@ -46,14 +49,18 @@ class _PcwalletState extends State<Pcwallet> {
height:
25
,
),
),
Text
(
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
Text
(
"P.C. Wallet"
,
style:
TextStyle
(
fontSize:
16
,
height:
1.1
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
semi_black
,
),
),
),
Spacer
(),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
...
@@ -71,7 +78,7 @@ class _PcwalletState extends State<Pcwallet> {
),
SizedBox
(
width:
5
),
Text
(
"
${provider.totlDetails.balanceAmount}
"
,
"
${provider.totlDetails.balanceAmount
??"0.00"
}
"
,
style:
TextStyle
(
fontSize:
14
),
),
],
...
...
@@ -123,7 +130,7 @@ class _PcwalletState extends State<Pcwallet> {
),
),
Text
(
"
${provider.totlDetails.creditAmount}
"
,
"
${provider.totlDetails.creditAmount
??"0.00"
}
"
,
style:
TextStyle
(
fontSize:
30
,
height:
1
,
...
...
@@ -132,7 +139,9 @@ class _PcwalletState extends State<Pcwallet> {
),
],
),
Text
(
"Credited"
),
Text
(
"Credited"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
],
),
),
...
...
@@ -162,7 +171,7 @@ class _PcwalletState extends State<Pcwallet> {
),
),
Text
(
"
${provider.totlDetails.debitAmount}
"
,
"
${provider.totlDetails.debitAmount
??0.00
}
"
,
style:
TextStyle
(
fontSize:
30
,
height:
1
,
...
...
@@ -171,7 +180,9 @@ class _PcwalletState extends State<Pcwallet> {
),
],
),
Text
(
"Debited"
),
Text
(
"Debited"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
)),
],
),
),
...
...
@@ -199,6 +210,7 @@ class _PcwalletState extends State<Pcwallet> {
date
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
...
...
@@ -223,13 +235,37 @@ class _PcwalletState extends State<Pcwallet> {
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
s
paceBetween
,
MainAxisAlignment
.
s
tart
,
children:
[
Column
(
Expanded
(
flex:
1
,
child:
SizedBox
(
child:
item
.
transactionType
==
"Credit"
?
Image
.
asset
(
"assets/images/trans_credit.png"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
)
:
Image
.
asset
(
"assets/images/trans_debit.png"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
),
),
),
SizedBox
(
width:
10
,),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
part1
),
Text
(
part1
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
Text
(
"
${part2}
"
,
style:
TextStyle
(
...
...
@@ -238,40 +274,38 @@ class _PcwalletState extends State<Pcwallet> {
),
],
),
RichText
(
),
),
Spacer
(),
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
item
.
transactionType
==
"Credit"
?
"+"
:
"-"
,
style:
TextStyle
(
color:
item
.
transactionType
==
text:
item
.
transactionType
==
"Credit"
?
Color
(
0xFF0D9C00
)
:
Color
(
0xFFED3424
),
fontSize:
16
,
fontFamily:
"Lexend"
,
?
"+"
:
"-"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
"₹
${item.amount!}
"
,
style:
TextStyle
(
color:
item
.
transactionType
==
"Credit"
?
Color
(
0xFF0D9C00
)
:
Color
(
0xFFED3424
),
fontSize:
16
,
fontFamily:
"Lexend"
,
color:
Color
(
0xFF2D2D2D
),
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
),
),
],
),
);
...
...
@@ -285,6 +319,7 @@ class _PcwalletState extends State<Pcwallet> {
),
),
),
),
);
},
);
...
...
lib/screens/serviceEngineer/PaymentDetails.dart
View file @
528df0d2
...
...
@@ -58,7 +58,11 @@ class _PaymentdetailsState extends State<Paymentdetails> {
// Debug prints to inspect contactsDropDown and selectContact
debugPrint
(
"contactsDropDown:
${provider.contactsDropDown}
"
);
debugPrint
(
"selectContact:
${provider.selectContact}
"
);
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Payment Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
...
...
@@ -75,9 +79,14 @@ class _PaymentdetailsState extends State<Paymentdetails> {
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Text
(
"
${widget.name}
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),)),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),)),
SizedBox
(
height:
10
,),
Text
(
"Phone Number"
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Phone Number"
),
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
...
...
@@ -135,11 +144,18 @@ class _PaymentdetailsState extends State<Paymentdetails> {
_addContactSheet
(
context
);
},
child:
Container
(
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
),
borderRadius:
BorderRadius
.
circular
(
12
)
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
12
,
horizontal:
14
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
.
center
,
children:
const
[
Text
(
...
...
@@ -212,7 +228,10 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
),
SizedBox
(
height:
10
,),
Text
(
"Complaint Type"
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Complaint Type"
),
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
...
...
@@ -307,7 +326,10 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
),
SizedBox
(
height:
10
,),
Text
(
"Amount"
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Amount"
),
),
Container
(
height:
50
,
...
...
@@ -346,7 +368,10 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
),
SizedBox
(
height:
10
,),
Text
(
"Reference Number"
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Reference Number"
),
),
Container
(
height:
50
,
...
...
@@ -404,6 +429,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
child:
Center
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),),
),
...
...
@@ -434,13 +460,17 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
30
.0
),
borderRadius:
BorderRadius
.
circular
(
15
.0
),
),
child:
Center
(
child:
Text
(
"Send OTP"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
),
),
),
...
...
lib/screens/serviceEngineer/PendingComplaints.dart
View file @
528df0d2
...
...
@@ -4,6 +4,7 @@ import 'package:generp/Notifiers/PendingComplaintsProvider.dart';
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/serviceEngineer/PaymentDetails.dart'
;
import
'package:generp/screens/serviceEngineer/VisitDetails.dart'
;
import
'package:generp/screens/serviceEngineer/scanComplaintDetails.dart'
;
import
'package:provider/provider.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'../../Utils/app_colors.dart'
;
...
...
@@ -36,52 +37,42 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Pendingcomplaintsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
title:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
,
),
),
Text
(
appBar:
appbar2
(
context
,
"Pending Complaints"
,
style:
TextStyle
(
fontSize:
16
,
height:
1.1
,
color:
AppColors
.
semi_black
,
),
),
Spacer
(),
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
],
),
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
// Adjust the radius as needed
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Scancomplaintdetails
(),
),
);
},
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
),
),
body:
Container
(
body:
provider
.
technician_complaint_list
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
itemCount:
provider
.
technician_complaint_list
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -103,14 +94,21 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
SizedBox
(
width:
5
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.technician_complaint_list[index].contactName}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
Text
(
"
${provider.technician_complaint_list[index].companyName}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
),
],
),
...
...
@@ -125,6 +123,9 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
},
child:
SvgPicture
.
asset
(
"assets/svg/se_call_customer.svg"
,
color:
Color
(
0xFF0D9C00
),
height:
20
,
width:
20
,
),
),
),
...
...
@@ -153,21 +154,45 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
3
,
(
j
)
{
final
textheads
=
[
"ID"
,
"Generator Type"
,
"Address"
];
final
textheads
=
[
"ID"
,
"Generator Type"
,
"Address"
,
];
final
textSubheads
=
[
provider
.
technician_complaint_list
[
index
].
genId
,
provider
.
technician_complaint_list
[
index
].
productName
,
provider
.
technician_complaint_list
[
index
].
address
,
provider
.
technician_complaint_list
[
index
]
.
genId
,
provider
.
technician_complaint_list
[
index
]
.
productName
,
provider
.
technician_complaint_list
[
index
]
.
address
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
Expanded
(
flex:
1
,
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
Expanded
(
flex:
2
,
child:
Text
(
textSubheads
[
j
].
toString
(),
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
],
),
...
...
@@ -194,10 +219,15 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
...
...
@@ -206,6 +236,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
);
},
),
):
Emptywidget
(
context
),
),
);
},
...
...
@@ -310,10 +341,11 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
leading:
SvgPicture
.
asset
(
"assets/svg/
${assetnames[index]}
.svg"
,
),
title:
Text
(
Headingnames
[
index
]),
trailing:
Icon
(
Icons
.
arrow_forward_ios_sharp
,
size:
16
,
title:
Text
(
Headingnames
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
);
}),
...
...
lib/screens/serviceEngineer/TodayMontlyVisists.dart
View file @
528df0d2
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/serviceEngineer/PaymentDetails.dart'
;
import
'package:generp/screens/serviceEngineer/VisitDetails.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -45,52 +46,30 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Todaymontlyvisitsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
title:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
,
),
),
Text
(
provider
.
title
,
style:
TextStyle
(
fontSize:
16
,
height:
1.1
,
color:
AppColors
.
semi_black
,
),
),
Spacer
(),
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
],
),
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
// Adjust the radius as needed
),
),
),
body:
Container
(
appBar:
appbar
(
context
,
provider
.
title
),
body:
provider
.
visitsList
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
itemCount:
provider
.
visitsList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -105,20 +84,42 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
children:
[
Expanded
(
flex:
1
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
width:
30
,
height:
30
,
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
5
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.visitsList[index]
.companyName}
"
,
"
${provider.visitsList[index].contactName ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
Text
(
"
${provider.visitsList[index].companyName}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
Text
(
"Gen Pvt. Ltd"
),
],
),
Spacer
(),
...
...
@@ -127,13 +128,14 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${provider
.visitsList[index]
.mobileNo}
'
,
'tel://
${provider.visitsList[index].mobileNo}
'
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_call_customer.svg"
,
color:
Color
(
0xFF0D9C00
),
height:
20
,
width:
20
,
),
),
),
...
...
@@ -148,9 +150,19 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
// ),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
),
...
List
.
generate
(
3
,
(
j
)
{
final
textheads
=
[
"ID"
,
"Generator Type"
,
"Address"
];
final
textheads
=
[
"ID"
,
"Generator Type"
,
"Address"
,
];
final
textSubheads
=
[
provider
.
visitsList
[
index
].
genId
,
provider
.
visitsList
[
index
].
productName
,
...
...
@@ -158,31 +170,60 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
textSubheads
[
j
].
toString
()),
Expanded
(
flex:
1
,
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
Expanded
(
flex:
2
,
child:
Text
(
textSubheads
[
j
].
toString
(),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetails
(
accountName:
"Generator"
,
name:
provider
.
visitsList
[
index
].
companyName
,
genId:
provider
.
visitsList
[
index
].
genId
,
referenceID:
provider
.
visitsList
[
index
].
complaintId
),));
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetails
(
accountName:
"Generator"
,
name:
provider
.
visitsList
[
index
]
.
companyName
,
genId:
provider
.
visitsList
[
index
]
.
genId
,
referenceID:
provider
.
visitsList
[
index
]
.
complaintId
,
),
),
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_payment_details.svg"
,
...
...
@@ -191,18 +232,32 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
Spacer
(),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Visitdetails
(
complaintID:
provider
.
visitsList
[
index
].
complaintId
),));
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Visitdetails
(
complaintID:
provider
.
visitsList
[
index
]
.
complaintId
,
),
),
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),),
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
...
...
@@ -218,6 +273,8 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
);
},
),
)
:
Emptywidget
(
context
),
),
);
},
...
...
@@ -262,8 +319,10 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
),
title:
Text
(
"Payment Details"
),
trailing:
Icon
(
Icons
.
arrow_forward_ios_sharp
,
size:
16
,),
)
Icons
.
arrow_forward_ios_sharp
,
size:
16
,
),
),
],
),
),
...
...
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
528df0d2
...
...
@@ -26,7 +26,10 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Pendingcomplaintsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Update Complaint"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
...
...
@@ -42,17 +45,20 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
children:
[
SizedBox
(
height:
15
),
Text
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Complaint Status"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
grey
,
fontFamily:
"JakartaMedium"
,
color:
App
Colors
.
semi_black
,
),
),
Row
(
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
hint:
const
Row
(
...
...
@@ -89,7 +95,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
),
decoration:
BoxDecoration
(
...
...
@@ -107,7 +113,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
width:
3
1
0
,
width:
3
5
0
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
...
...
@@ -127,14 +133,18 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
),
],
),
Text
(
),
SizedBox
(
height:
5
,),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"FSR Number"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
grey
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
Container
(
...
...
@@ -174,17 +184,18 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
SizedBox
(
height:
5
,),
Row
(
children:
[
Expanded
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20.0
),
horizontal:
5.0
,
vertical:
3
),
child:
Text
(
"Select Time"
,
style:
TextStyle
(
font
Weight:
FontWeight
.
w400
,
color:
Colors
.
grey
,
font
Family:
"JakartaMedium"
,
color:
App
Colors
.
semi_black
,
),
),
),
...
...
@@ -197,7 +208,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
"Running Hours"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
grey
,
color:
App
Colors
.
semi_black
,
),
),
),
...
...
@@ -205,6 +216,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
),
Row
(
children:
[
Expanded
(
...
...
@@ -310,11 +322,14 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
Text
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Feedback"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
grey
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
Container
(
...
...
@@ -382,13 +397,17 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
30
.0
),
borderRadius:
BorderRadius
.
circular
(
15
.0
),
),
child:
Center
(
child:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
),
),
),
...
...
lib/screens/serviceEngineer/VisitDetails.dart
View file @
528df0d2
...
...
@@ -37,7 +37,10 @@ class _VisitdetailsState extends State<Visitdetails> {
var
customerDetails
=
provider
.
customerDetails
;
var
generatorDetails
=
provider
.
generatorDetails
;
var
complaintDetails
=
provider
.
complaintDetailsNew
;
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Visit Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
...
...
@@ -330,6 +333,7 @@ class _VisitdetailsState extends State<Visitdetails> {
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
);
...
...
lib/screens/serviceEngineer/scanComplaintDetails.dart
0 → 100644
View file @
528df0d2
import
'package:flutter/material.dart'
;
import
'package:generp/Notifiers/HomeScreenNotifier.dart'
;
import
'package:generp/Notifiers/InventoryProvider.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:provider/provider.dart'
;
import
'package:qr_code_scanner/qr_code_scanner.dart'
;
import
'../../Utils/app_colors.dart'
;
class
Scancomplaintdetails
extends
StatefulWidget
{
const
Scancomplaintdetails
({
super
.
key
});
@override
State
<
Scancomplaintdetails
>
createState
()
=>
_ScancomplaintdetailsState
();
}
class
_ScancomplaintdetailsState
extends
State
<
Scancomplaintdetails
>
{
FocusNode
partIDfocusNode
=
FocusNode
();
TextEditingController
partIDcontroller
=
TextEditingController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
var
inventoryProvider
=
Provider
.
of
<
InventoryProvider
>(
context
,
listen:
false
,
);
inventoryProvider
.
checkPermission1
();
inventoryProvider
.
requestCameraPermission
();
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
InventoryProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Pending Complaints"
),
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
children:
[
Spacer
(),
Container
(
height:
250
,
child:
QRView
(
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
"pendingComplaints"
,
context
);
},
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderLength:
60
,
borderWidth:
10
,
cutOutSize:
250.0
,
),
),
),
SizedBox
(
height:
25
),
Text
(
"Scan QR"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
),
Text
(
"to open Complaints"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
Spacer
(),
Text
(
"or"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
),
InkResponse
(
onTap:
()
async
{
_showPartIdBottomSheet
(
context
);
},
child:
Text
(
"Tap To Enter Generator ID"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
),
SizedBox
(
height:
50
),
],
),
),
),
);
},
);
}
Future
<
void
>
_showPartIdBottomSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
useRootNavigator:
true
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Padding
(
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
,
).
viewInsets
.
bottom
,
// This handles keyboard
),
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
30
,
),
child:
Consumer2
<
InventoryProvider
,
HomescreenNotifier
>(
builder:
(
context
,
provider
,
homeProvider
,
child
)
{
return
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Generator ID"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
),
),
SizedBox
(
height:
5
,),
Container
(
height:
48
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
20
),
border:
partIDfocusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
)
:
null
,
),
// alignment: Alignment.center,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
15
,
0
,
),
child:
TextField
(
controller:
partIDcontroller
,
keyboardType:
TextInputType
.
emailAddress
,
focusNode:
partIDfocusNode
,
textCapitalization:
TextCapitalization
.
characters
,
style:
TextStyle
(
fontSize:
14
),
onChanged:
(
value
)
{},
onTapOutside:
(
event
)
{
// Handle onTapOutside
FocusScope
.
of
(
context
).
unfocus
();
},
decoration:
InputDecoration
(
isDense:
true
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontSize:
14
,
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
hintText:
'Enter Generator ID'
,
),
),
),
),
SizedBox
(
height:
15
,),
InkWell
(
onTap:
()
{
provider
.
LoadgeneratorComplaintHistoryApifunction
(
homeProvider
,
context
,
"pendingComplaints"
,
partIDcontroller
.
text
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
,
top:
5.0
,
bottom:
5.0
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Center
(
child:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
),
),
),
],
),
);
},
),
),
),
);
},
);
},
);
}
}
lib/screens/serviceEngineer/serviceEngineerDashboard.dart
View file @
528df0d2
...
...
@@ -35,7 +35,10 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Serviceengineerdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
...
...
@@ -52,14 +55,18 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
height:
25
,
),
),
Text
(
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
Text
(
"Service Engineer"
,
style:
TextStyle
(
fontSize:
16
,
height:
1.1
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
semi_black
,
),
),
),
Spacer
(),
Container
(
height:
25
,
...
...
@@ -161,7 +168,9 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Collections & Visits"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontFamily:
"JakartaMedium"
,
fontSize:
14
),
),
),
Container
(
...
...
@@ -199,14 +208,14 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
"Today Visits"
,
];
final
List
<
int
>
colorCodes
=
[
0xFFEEFCFF
,
0xFFE7FFE5
,
0xFFFFFCD5
,
0xFFF3EDFF
,
0xFFFFF6F0
,
];
final
List
<
int
>
textColorCodes
=
[
0xFF1487C9
,
0xFF0D9C00
,
0xFF605C00
,
0xFF493272
,
0xFF91481B
,
];
...
...
@@ -241,20 +250,34 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
),
decoration:
BoxDecoration
(
color:
Color
(
colorCodes
[
index
]),
borderRadius:
BorderRadius
.
circular
(
2
0
),
borderRadius:
BorderRadius
.
circular
(
1
2
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
numbers
[
index
].
toString
(),
Row
(
children:
[
Text
(
"₹"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
textColorCodes
[
index
]),
),),
Padding
(
padding:
EdgeInsets
.
only
(
top:
5
),
child:
Text
(
"
${numbers[index].toString()}
"
,
style:
TextStyle
(
fontSize:
30
,
fontSize:
27
,
color:
Color
(
textColorCodes
[
index
]),
),
),
Text
(
names
[
index
]),
),
],
),
Text
(
names
[
index
],
style:
TextStyle
(
color:
Color
(
0xFF818181
)
),),
],
),
),
...
...
@@ -294,6 +317,7 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
),
),
),
),
);
},
);
...
...
lib/screens/splash.dart
View file @
528df0d2
...
...
@@ -25,6 +25,7 @@ class _SplashState extends State<Splash> {
// TODO: implement initState
super
.
initState
();
splashImage
=
Image
.
asset
(
"assets/images/ic_splash.jpg"
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
requestPermissions
();
final
spalshProvider
=
Provider
.
of
<
SplashVersionNotifier
>(
context
,
...
...
@@ -32,6 +33,9 @@ class _SplashState extends State<Splash> {
);
spalshProvider
.
initPackageInfo
();
spalshProvider
.
handleVersionCheck
(
context
);
},);
}
void
requestPermissions
()
async
{
...
...
@@ -139,6 +143,7 @@ class _SplashState extends State<Splash> {
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
body:
Consumer
<
SplashVersionNotifier
>(
builder:
(
context
,
value
,
child
)
{
return
Container
(
...
...
lib/services/api_calling.dart
View file @
528df0d2
...
...
@@ -104,7 +104,7 @@ class ApiCalling {
try
{
final
response
=
await
post
({},
getAppVersionUrl
,
{});
if
(
response
!=
null
)
{
//
print("${response.body}");
print
(
"
${response.body}
"
);
return
VersionsResponse
.
fromJson
(
jsonDecode
(
response
.
body
));
}
else
{
return
null
;
...
...
@@ -432,7 +432,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
genTrackerGeneratorDetailsUrl
,
{});
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
res
.
body
);
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
pubspec.lock
View file @
528df0d2
...
...
@@ -29,18 +29,10 @@ packages:
dependency: transitive
description:
name: async
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.13.0"
background_location:
dependency: "direct main"
description:
name: background_location
sha256: fbb83ceb8cefcc6793f0a362f12773c28fc290a5e2c76cb593ee592ec7b6cb32
url: "https://pub.dev"
source: hosted
version: "0.13.0"
version: "2.12.0"
boolean_selector:
dependency: transitive
description:
...
...
@@ -237,10 +229,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
url: "https://pub.dev"
source: hosted
version: "1.3.
3
"
version: "1.3.
2
"
ffi:
dependency: transitive
description:
...
...
@@ -860,26 +852,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256:
"8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "1
1
.0.
1
"
version: "1
0
.0.
8
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.
10
"
version: "3.0.
9
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
url: "https://pub.dev"
source: hosted
version: "3.0.
2
"
version: "3.0.
1
"
lints:
dependency: transitive
description:
...
...
@@ -1481,10 +1473,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "1
5.0.0
"
version: "1
4.3.1
"
web:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
528df0d2
...
...
@@ -71,7 +71,6 @@ dependencies:
cached_network_image
:
^3.4.1
geocoding
:
^3.0.0
webview_flutter_wkwebview
:
^3.20.0
background_location
:
^0.13.0
dev_dependencies
:
flutter_test
:
...
...
@@ -149,5 +148,29 @@ flutter:
fonts
:
-
asset
:
fonts/Lexend-Light.ttf
-
family
:
JakartaLight
fonts
:
-
asset
:
fonts/PlusJakartaSans-Light.ttf
-
family
:
JakartaRegular
fonts
:
-
asset
:
fonts/PlusJakartaSans-Regular.ttf
-
family
:
JakartaSemiBold
fonts
:
-
asset
:
fonts/PlusJakartaSans-SemiBold.ttf
-
family
:
JakartaMedium
fonts
:
-
asset
:
fonts/PlusJakartaSans-Medium.ttf
-
family
:
JakartaBold
fonts
:
-
asset
:
fonts/PlusJakartaSans-Bold.ttf
-
family
:
JakartaExtraBold
fonts
:
-
asset
:
fonts/PlusJakartaSans-ExtraBold.ttf
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment