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
d24e453e
Commit
d24e453e
authored
Jun 19, 2025
by
Sai Srinivas
Browse files
19-06-2025 By Sai Srinivas
Finance Module Test cases & Safe Area
parent
4807bee4
Changes
52
Hide whitespace changes
Inline
Side-by-side
lib/screens/serviceEngineer/MonthlyCollection.dart
View file @
d24e453e
...
@@ -56,7 +56,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -56,7 +56,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Payment Collection"
,
provider
.
resetAll
,
sendWidget
),
appBar:
appbar2
(
context
,
"Payment Collection"
,
provider
.
resetAll
,
sendWidget
),
body:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
body:
SafeArea
(
child:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
shrinkWrap:
true
,
...
@@ -203,12 +203,12 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -203,12 +203,12 @@ class _MonthlycollectionState extends State<Monthlycollection> {
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
WebErpScreen
(
(
context
)
=>
WebErpScreen
(
erp_url:
erp_url:
provider
provider
.
paymenCollectionList
[
index
]
.
paymenCollectionList
[
index
]
.
paymentProofFilePath
??
.
paymentProofFilePath
??
""
,
""
,
),
),
),
),
);
);
},
},
...
@@ -232,7 +232,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -232,7 +232,7 @@ class _MonthlycollectionState extends State<Monthlycollection> {
);
);
},
},
),
),
):
Emptywidget
(
context
),
):
Emptywidget
(
context
),
)
),
),
);
);
},
},
...
...
lib/screens/serviceEngineer/NearbyGenerators.dart
View file @
d24e453e
...
@@ -213,43 +213,45 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -213,43 +213,45 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Nearby Generators"
,
provider
.
resetAll
,
sendWidget
),
appBar:
appbar2
(
context
,
"Nearby Generators"
,
provider
.
resetAll
,
sendWidget
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
children:
[
child:
Column
(
ClipRRect
(
children:
[
// Apply border radius using ClipRRect
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
// Apply border radius using ClipRRect
topLeft:
Radius
.
circular
(
30.0
),
borderRadius:
BorderRadius
.
only
(
topRight:
Radius
.
circular
(
30.0
),
topLeft:
Radius
.
circular
(
30.0
),
),
topRight:
Radius
.
circular
(
30.0
),
// padding: EdgeInsets.fromLTRB(10, 20, 10, 20),
),
child:
Container
(
// padding: EdgeInsets.fromLTRB(10, 20, 10, 20),
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Container
(
child:
Stack
(
children:
[
height:
MediaQuery
.
of
(
context
).
size
.
height
,
GoogleMap
(
child:
Stack
(
children:
[
myLocationEnabled:
true
,
GoogleMap
(
zoomGesturesEnabled:
true
,
myLocationEnabled:
true
,
zoomGesturesEnabled:
true
,
initialCameraPosition:
CameraPosition
(
target:
provider
.
startLocation
,
initialCameraPosition:
CameraPosition
(
zoom:
14.0
,
target:
provider
.
startLocation
,
zoom:
14.0
,
),
markers:
provider
.
markers
.
toSet
(),
mapType:
MapType
.
normal
,
onMapCreated:
(
controller
)
{
setState
(()
{
provider
.
mapController
=
controller
;
});
},
onCameraMove:
(
position
)
{
provider
.
onCameraMove
(
context
,
position
);
},
),
),
markers:
provider
.
markers
.
toSet
(),
]),
mapType:
MapType
.
normal
,
),
onMapCreated:
(
controller
)
{
setState
(()
{
provider
.
mapController
=
controller
;
});
},
onCameraMove:
(
position
)
{
provider
.
onCameraMove
(
context
,
position
);
},
),
]),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/PCWallet.dart
View file @
d24e453e
...
@@ -94,228 +94,230 @@ class _PcwalletState extends State<Pcwallet> {
...
@@ -94,228 +94,230 @@ class _PcwalletState extends State<Pcwallet> {
),
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
children:
[
child:
Column
(
Container
(
children:
[
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
Container
(
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Row
(
),
children:
[
child:
Row
(
Expanded
(
children:
[
child:
Container
(
Expanded
(
padding:
EdgeInsets
.
symmetric
(
child:
Container
(
horizontal:
15
,
padding:
EdgeInsets
.
symmetric
(
vertical:
15
,
horizontal:
15
,
),
vertical:
15
,
decoration:
BoxDecoration
(
),
color:
Color
(
0xFFE7FFE5
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Color
(
0xFFE7FFE5
),
),
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Column
(
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
Row
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
center
,
Row
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
center
,
Text
(
children:
[
"₹"
,
Text
(
style:
TextStyle
(
"₹"
,
height:
1
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
height:
1
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
Text
(
Text
(
"
${provider.totlDetails.creditAmount??"0.00"}
"
,
"
${provider.totlDetails.creditAmount??"0.00"}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
30
,
fontSize:
30
,
height:
1
,
height:
1
,
color:
Color
(
0xFF0D9C00
)
,
color:
Color
(
0xFF0D9C00
),
),
),
),
)
,
]
,
]
,
)
,
),
Text
(
"Credited"
,
style:
TextStyle
(
Text
(
"Credited"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
),),
),)
,
]
,
]
,
)
,
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
horizont
al:
15
,
vertic
al:
15
,
vertical:
15
,
)
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFEFEF
),
color:
Color
(
0xFFFFEFEF
),
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
center
,
childr
en:
[
children:
[
Text
(
Text
(
"₹"
,
"₹"
,
style:
TextStyle
(
style:
TextStyle
(
height:
1
,
height:
1
,
color:
Color
(
0xFFED3424
)
,
color:
Color
(
0xFFED3424
),
),
),
),
),
Text
(
Text
(
"
${provider.totlDetails.debitAmount??0.00}
"
,
"
${provider.totlDetails.debitAmount??0.00}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
30
,
fontSize:
30
,
height:
1
,
height:
1
,
color:
Color
(
0xFFED3424
)
,
color:
Color
(
0xFFED3424
),
),
),
),
)
,
]
,
]
,
)
,
),
Text
(
"Debited"
,
style:
TextStyle
(
Text
(
"Debited"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
)),
))
,
]
,
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
ListView
.
builder
(
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
()
,
shrinkWrap:
true
,
shrinkWrap:
true
,
itemCount:
groupedData
.
keys
.
length
,
item
Count:
groupedData
.
keys
.
length
,
item
Builder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
String
date
=
groupedData
.
keys
.
elementAt
(
index
)
;
String
date
=
groupedData
.
keys
.
elementAt
(
index
)
;
List
<
HistoryList
>
items
=
groupedData
[
date
]!
;
List
<
HistoryList
>
items
=
groupedData
[
date
]!;
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
padd
in
g
:
EdgeInsets
.
symmetric
(
vertic
al:
5
),
marg
in:
EdgeInsets
.
symmetric
(
horizont
al:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Container
(
Container
(
padding:
EdgeInsets
.
only
(
bottom:
5
),
padding:
EdgeInsets
.
only
(
bottom:
5
),
child:
Text
(
child:
Text
(
date
,
date
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
)
,
color:
Color
(
0xFF818181
),
),
),
),
),
),
),
...
items
.
map
((
item
)
{
...
items
.
map
((
item
)
{
String
part1
=
String
part1
=
item
.
description
!.
split
(
' ('
).
first
;
item
.
description
!.
split
(
' ('
).
first
;
RegExp
regExp
=
RegExp
(
r'\(([^)]+)\)'
);
RegExp
regExp
=
RegExp
(
r'\(([^)]+)\)'
);
String
?
part2
=
regExp
String
?
part2
=
regExp
.
firstMatch
(
item
.
description
!)
.
firstMatch
(
item
.
description
!)
?.
group
(
1
);
?.
group
(
1
);
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
SizedBox
(
child:
SizedBox
(
child:
item
.
transactionType
==
"Credit"
child:
item
.
transactionType
==
"Credit"
?
Image
.
asset
(
?
Image
.
asset
(
"assets/images/trans_credit.png"
,
"assets/images/trans_credit.png"
,
height:
45
,
height:
45
,
width:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
contain
,
)
)
:
Image
.
asset
(
:
Image
.
asset
(
"assets/images/trans_debit.png"
,
"assets/images/trans_debit.png"
,
height:
45
,
height:
45
,
width:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
contain
,
),
),
),
SizedBox
(
width:
10
,),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
part1
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
Text
(
"
${part2}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
],
),
),
),
),
),
SizedBox
(
width:
10
,
),
Spacer
(),
Expanded
(
Expanded
(
flex:
5
,
flex:
2
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
RichText
(
crossAxisAlignment:
text:
TextSpan
(
CrossAxisAlignment
.
start
,
children:
[
children:
[
TextSpan
(
Text
(
part1
,
style:
TextStyle
(
text:
item
.
transactionType
==
fontFamily:
"JakartaMedium"
"Credit"
),),
?
"+"
:
"-"
,
Text
(
"
${part2}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
color:
Color
(
0xFF818181
),
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
"₹
${item.amount!}
"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
],
],
),
),
),
),
),
),
),
Spacer
(),
],
Expanded
(
),
flex:
2
,
);
child:
SizedBox
(
}).
toList
(),
child:
RichText
(
],
text:
TextSpan
(
),
children:
[
);
TextSpan
(
},
text:
item
.
transactionType
==
),
"Credit"
],
?
"+"
:
"-"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
"₹
${item.amount!}
"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
),
),
],
),
);
}).
toList
(),
],
),
);
},
),
],
),
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/PaymentDetails.dart
View file @
d24e453e
...
@@ -65,395 +65,397 @@ class _PaymentdetailsState extends State<Paymentdetails> {
...
@@ -65,395 +65,397 @@ class _PaymentdetailsState extends State<Paymentdetails> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Payment Details"
),
appBar:
appbar
(
context
,
"Payment Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
)
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
)
child:
SingleChildScrollView
(
),
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
Container
(
children:
[
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
Container
(
child:
Text
(
"
${widget.name}
"
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
style:
TextStyle
(
child:
Text
(
"
${widget.name}
"
,
fontFamily:
"JakartaMedium"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),)),
fontFamily:
"JakartaMedium"
,
SizedBox
(
height:
10
,),
color:
AppColors
.
app_blue
),)),
Padding
(
SizedBox
(
height:
10
,),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
Padding
(
child:
Text
(
"Phone Number"
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
),
child:
Text
(
"Phone Number"
),
DropdownButtonHideUnderline
(
),
child:
Row
(
DropdownButtonHideUnderline
(
children:
[
child:
Row
(
Expanded
(
children:
[
child:
DropdownButton2
<
Contacts
>(
Expanded
(
isExpanded:
true
,
child:
DropdownButton2
<
Contacts
>(
hint:
const
Row
(
isExpanded:
true
,
children:
[
hint:
const
Row
(
Expanded
(
children:
[
child:
Text
(
Expanded
(
'Select Phone Number'
,
child:
Text
(
style:
TextStyle
(
'Select Phone Number'
,
fontSize:
14
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
],
],
),
),
items:
[
items:
[
...
provider
.
contactsDropDown
.
map
((
contacts
)
{
...
provider
.
contactsDropDown
.
map
((
contacts
)
{
return
DropdownMenuItem
<
Contacts
>(
return
DropdownMenuItem
<
Contacts
>(
value:
contacts
,
value:
contacts
,
// You can use the entire object, but we need to ensure it's unique
// You can use the entire object, but we need to ensure it's unique
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
crossAxisAlignment:
CrossAxisAlignment
.
start
,
.
start
,
children:
[
children:
[
Text
(
Text
(
contacts
.
name
??
""
,
contacts
.
name
??
""
,
maxLines:
1
,
maxLines:
1
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
12
,
fontSize:
12
,
),
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
Text
(
contacts
.
mob1
??
""
,
style:
const
TextStyle
(
fontSize:
12
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
],
),
);
}).
toList
(),
DropdownMenuItem
<
Contacts
>(
value:
null
,
// No value associated with the button
enabled:
false
,
// To disable selecting this item
child:
InkWell
(
onTap:
()
{
_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
.
center
,
children:
const
[
Text
(
Text
(
'Add Contact'
,
contacts
.
mob1
??
""
,
style:
TextStyle
(
fontSize:
14
,
style:
const
TextStyle
(
color:
Colors
.
blue
),
fontSize:
12
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
],
),
),
);
}).
toList
(),
DropdownMenuItem
<
Contacts
>(
value:
null
,
// No value associated with the button
enabled:
false
,
// To disable selecting this item
child:
InkWell
(
onTap:
()
{
_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
.
center
,
children:
const
[
Text
(
'Add Contact'
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
blue
),
),
],
),
),
),
),
),
),
)
,
]
,
]
,
value:
provider
.
selectContact
,
value:
provider
.
selectContact
,
// The selected value is now the entire 'Contacts' object
// The selected value is now the entire 'Contacts' object
onChanged:
(
Contacts
?
value
)
{
onChanged:
(
Contacts
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
contactsDropDown
.
isNotEmpty
)
{
if
(
provider
.
contactsDropDown
.
isNotEmpty
)
{
provider
.
selectContact
=
provider
.
select
C
ontact
=
value
;
// Set the
select
ed c
ontact
value
;
// Set the selected contact
provider
.
contact
=
value
.
name
??
provider
.
contact
=
value
.
name
??
""
;
// Update the contact
name
""
;
// Update the contact name
provider
.
contactID
=
value
.
mob1
??
provider
.
contactID
=
value
.
mob1
??
""
;
// Update the
contact
ID
""
;
// Update the contact ID
debugPrint
(
"Selected Contact:
${value
debugPrint
(
"Selected Contact:
${value
.name}
, Phone:
${value.mob1}
"
);
.name}
, Phone:
${value.mob1}
"
);
}
}
}
}
}
,
},
buttonStyleData:
ButtonStyleData
(
buttonStyleData:
ButtonStyleData
(
height:
50
,
height:
5
0
,
width:
16
0
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
),
left:
14
,
right:
14
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
)
,
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
)
,
),
),
),
iconStyleData:
IconStyleData
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
width:
280
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
MaterialStateProperty
.
all
<
double
>(
width:
280
,
6
),
decoration:
BoxDecoration
(
thumbVisibility:
MaterialStateProperty
.
all
<
borderRadius:
BorderRadius
.
circular
(
14
),
bool
>(
true
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
60
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
60
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
10
,),
SizedBox
(
height:
10
,),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Complaint Type"
),
child:
Text
(
"Complaint Type"
),
),
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
PaymentModeList
>(
child:
DropdownButton2
<
PaymentModeList
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'Select Complaint Type'
,
'Select Complaint Type'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
],
],
),
),
items:
provider
.
paymentModeDropDown
items:
provider
.
paymentModeDropDown
.
map
((
paymentMode
)
=>
.
map
((
paymentMode
)
=>
DropdownMenuItem
<
PaymentModeList
>(
DropdownMenuItem
<
PaymentModeList
>(
value:
paymentMode
,
value:
paymentMode
,
child:
Text
(
child:
Text
(
paymentMode
.
name
??
''
,
paymentMode
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
))
),
.
toList
(),
))
value:
provider
.
selectPaymentMode
,
.
toList
(),
onChanged:
(
PaymentModeList
?
value
)
{
value:
provider
.
selectPaymentMode
,
if
(
value
!=
null
)
{
onChanged:
(
PaymentModeList
?
value
)
{
if
(
provider
.
paymentModeDropDown
.
isNotEmpty
)
{
if
(
value
!=
null
)
{
provider
.
selectPaymentMode
=
value
;
if
(
provider
.
paymentModeDropDown
.
isNotEmpty
)
{
print
(
provider
.
selectPaymentMode
=
value
;
"Selected Complaint Type:
${value
print
(
.name}
, ID:
${value.id}
"
);
"Selected Complaint Type:
${value
provider
.
PaymentMode
=
value
?.
name
;
.name}
, ID:
${value.id}
"
);
provider
.
paymentModeID
=
value
?.
id
;
provider
.
PaymentMode
=
value
?.
name
;
print
(
"hfjkshfg"
+
provider
.
paymentModeID
=
value
?.
id
;
provider
.
paymentModeID
.
toString
());
print
(
"hfjkshfg"
+
}
provider
.
paymentModeID
.
toString
());
}
}
}
}
,
},
buttonStyleData:
ButtonStyleData
(
buttonStyleData:
ButtonStyleData
(
height:
50
,
height:
50
,
width:
MediaQuery
width:
MediaQuery
.
of
(
context
)
.
of
(
context
)
.
size
.
size
.
width
,
.
width
,
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
),
left:
14
,
right:
14
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
)
,
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
)
,
),
),
),
iconStyleData:
IconStyleData
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
width:
340
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
width:
340
,
MaterialStateProperty
.
all
<
double
>(
6
),
decoration:
BoxDecoration
(
thumbVisibility:
borderRadius:
BorderRadius
.
circular
(
14
),
MaterialStateProperty
.
all
<
bool
>(
true
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
),
],
],
),
),
SizedBox
(
height:
10
,),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Amount"
),
),
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
Amountcontroller
,
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Amount"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
SizedBox
(
height:
10
,),
SizedBox
(
height:
10
,),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Amount"
),
child:
Text
(
"Reference Number"
),
),
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
Container
(
padding:
height:
50
,
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
alignment:
Alignment
.
center
,
child:
TextFormField
(
decoration:
BoxDecoration
(
controller:
color:
AppColors
.
text_field_color
,
Referencecontroller
,
borderRadius:
keyboardType:
BorderRadius
.
circular
(
14
),
TextInputType
.
text
,
),
decoration:
InputDecoration
(
child:
Padding
(
padding:
hintText:
const
EdgeInsets
.
fromLTRB
(
"Enter Reference Number"
,
10.0
,
0.0
,
10
,
0
),
hintStyle:
TextStyle
(
child:
TextFormField
(
fontWeight:
FontWeight
.
w400
,
controller:
color:
Color
(
0xFFB4BEC0
),
Amountcontroller
,
fontSize:
14
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Amount"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
SizedBox
(
height:
10
,),
SizedBox
(
height:
10
,),
Padding
(
InkResponse
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
onTap:
()
{
child:
Text
(
"Reference Number"
),
_showAttachmentSheet
(
context
);
),
},
Container
(
child:
Container
(
height:
50
,
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
alignment:
Alignment
.
center
,
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
border:
Border
.
all
(
BorderRadius
.
circular
(
14
),
color:
AppColors
.
app_blue
,
width:
0.5
)
),
),
child:
Center
(
child:
Padding
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
padding:
fontFamily:
"JakartaMedium"
,
const
EdgeInsets
.
fromLTRB
(
color:
AppColors
.
app_blue
10.0
,
0.0
,
10
,
0
),
),),
child:
TextFormField
(
controller:
Referencecontroller
,
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Reference Number"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
SizedBox
(
height:
10
,),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
InkResponse
(
Padding
(
onTap:
()
{
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
_showAttachmentSheet
(
context
);
child:
Row
(
},
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
child:
Container
(
children:
[
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
height:
45
,
color:
AppColors
.
semi_black
,
width:
MediaQuery
fontSize:
11
,
.
of
(
context
)
fontWeight:
FontWeight
.
w600
.
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
),
child:
Center
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),),
),),
InkResponse
(
),
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
),
),
)
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
),
)
],
],
],
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/PendingComplaints.dart
View file @
d24e453e
...
@@ -55,7 +55,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -55,7 +55,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
),
),
),
),
body:
provider
.
technician_complaint_list
.
isNotEmpty
?
Container
(
body:
SafeArea
(
child:
provider
.
technician_complaint_list
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
shrinkWrap:
true
,
...
@@ -95,7 +95,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -95,7 +95,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
flex:
4
,
flex:
4
,
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
"
${provider.technician_complaint_list[index].contactName}
"
,
"
${provider.technician_complaint_list[index].contactName}
"
,
...
@@ -179,7 +179,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -179,7 +179,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
...
@@ -210,11 +210,11 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -210,11 +210,11 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Visitdetails
(
(
context
)
=>
Visitdetails
(
complaintID:
complaintID:
provider
provider
.
technician_complaint_list
[
index
]
.
technician_complaint_list
[
index
]
.
complaintId
,
.
complaintId
,
),
),
),
),
);
);
},
},
...
@@ -225,8 +225,8 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -225,8 +225,8 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
Text
(
Text
(
"View Details"
,
"View Details"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
),
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
...
@@ -241,7 +241,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -241,7 +241,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
);
);
},
},
),
),
):
Emptywidget
(
context
),
):
Emptywidget
(
context
),
)
),
),
);
);
},
},
...
...
lib/screens/serviceEngineer/TodayMontlyVisists.dart
View file @
d24e453e
...
@@ -50,238 +50,238 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
...
@@ -50,238 +50,238 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
provider
.
title
),
appBar:
appbar
(
context
,
provider
.
title
),
body:
body:
SafeArea
(
child:
provider
.
visitsList
.
isNotEmpty
provider
.
visitsList
.
isNotEmpty
?
Container
(
?
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
shrinkWrap:
true
,
itemCount:
provider
.
visitsList
.
length
,
itemCount:
provider
.
visitsList
.
length
,
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
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"
,
),
),
),
),
child:
Column
(
SizedBox
(
width:
5
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
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
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
"
${provider.visitsList[index].contactName ?? "-"}
"
,
"
${provider.visitsList[index].contactName ?? "-"}
"
,
maxLines:
1
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
),
),
Text
(
"
${provider.visitsList[index].companyName}
"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
],
),
),
),
),
),
Spacer
(),
Text
(
Expanded
(
"
${provider.visitsList[index].companyName}
"
,
flex:
1
,
maxLines:
1
,
child:
InkResponse
(
overflow:
TextOverflow
.
ellipsis
,
onTap:
()
{
style:
TextStyle
(
launch
(
color:
Color
(
0xFF818181
),
'tel://
${provider.visitsList[index].mobileNo}
'
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_call_customer.svg"
,
color:
Color
(
0xFF0D9C00
),
height:
20
,
width:
20
,
),
),
),
),
),
// Expanded(
// flex: 1,
// child: InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: Icon(Icons.more_vert),
// ),
// ),
],
],
),
),
Padding
(
),
padding:
const
EdgeInsets
.
all
(
8.0
),
),
child:
Divider
(
Spacer
(),
thickness:
0.5
,
Expanded
(
color:
Color
(
0xFFD7D7D7
),
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${provider.visitsList[index].mobileNo}
'
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_call_customer.svg"
,
color:
Color
(
0xFF0D9C00
),
height:
20
,
width:
20
,
),
),
),
// Expanded(
// flex: 1,
// child: InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: Icon(Icons.more_vert),
// ),
// ),
],
),
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
textSubheads
=
[
provider
.
visitsList
[
index
].
genId
,
provider
.
visitsList
[
index
].
productName
,
provider
.
visitsList
[
index
].
address
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
...
List
.
generate
(
3
,
(
j
)
{
Expanded
(
final
textheads
=
[
flex:
2
,
"ID"
,
child:
Text
(
"Generator Type"
,
textSubheads
[
j
].
toString
(),
"Address"
,
style:
TextStyle
(
];
color:
Color
(
0xFF818181
),
final
textSubheads
=
[
provider
.
visitsList
[
index
].
genId
,
provider
.
visitsList
[
index
].
productName
,
provider
.
visitsList
[
index
].
address
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
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
,
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
,
),
),
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_payment_details.svg"
,
),
),
Spacer
(),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Visitdetails
(
complaintID:
provider
.
visitsList
[
index
]
.
complaintId
,
),
),
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
],
),
),
),
),
],
],
),
),
);
);
},
}),
),
SizedBox
(
)
child:
Row
(
:
Emptywidget
(
context
),
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
,
),
),
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_payment_details.svg"
,
),
),
Spacer
(),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Visitdetails
(
complaintID:
provider
.
visitsList
[
index
]
.
complaintId
,
),
),
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
],
),
),
],
),
);
},
),
)
:
Emptywidget
(
context
),)
),
),
);
);
},
},
...
...
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
d24e453e
...
@@ -31,247 +31,129 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -31,247 +31,129 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Update Complaint"
),
appBar:
appbar
(
context
,
"Update Complaint"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
child:
Container
(
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
)
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
)
child:
SingleChildScrollView
(
),
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
mainAxisSize:
MainAxisSize
.
min
,
SizedBox
(
height:
15
),
children:
[
SizedBox
(
height:
15
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
Padding
(
child:
Text
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
"Complaint Status"
,
child:
Text
(
style:
TextStyle
(
"Complaint Status"
,
fontFamily:
"JakartaMedium"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>(
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'Select Complaint Status'
,
'Select Complaint Status'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
],
],
),
),
items:
provider
.
CompletedStatus
.
map
(
items:
provider
.
CompletedStatus
.
map
(
(
complaintStatus
)
=>
(
complaintStatus
)
=>
DropdownMenuItem
<
String
>(
DropdownMenuItem
<
String
>(
value:
complaintStatus
[
'name'
],
value:
complaintStatus
[
'name'
],
child:
Text
(
child:
Text
(
complaintStatus
[
'name'
]
??
''
,
complaintStatus
[
'name'
]
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
)).
toList
(),
),
value:
provider
.
statusID
,
)).
toList
(),
onChanged:
(
value
)
{
value:
provider
.
statusID
,
if
(
value
!=
null
)
{
onChanged:
(
value
)
{
provider
.
statusID
=
value
;
if
(
value
!=
null
)
{
provider
.
statusError
=
""
;
provider
.
statusID
=
value
;
print
(
"statusId:
${provider.statusID}
"
);
provider
.
statusError
=
""
;
}
print
(
"statusId:
${provider.statusID}
"
);
},
}
buttonStyleData:
ButtonStyleData
(
},
height:
50
,
buttonStyleData:
ButtonStyleData
(
width:
160
,
height:
50
,
padding:
const
EdgeInsets
.
only
(
width:
160
,
left:
14
,
right:
14
),
padding:
const
EdgeInsets
.
only
(
decoration:
BoxDecoration
(
left:
14
,
right:
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
color:
AppColors
.
text_field_color
,
),
),
),
iconStyleData:
const
IconStyleData
(
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
icon:
Icon
(
Icons
.
keyboard_arrow_down_sharp
,
Icons
.
keyboard_arrow_down_sharp
,
),
iconSize:
14
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
),
),
iconSize:
14
,
dropdownStyleData:
DropdownStyleData
(
iconEnabledColor:
Color
(
0xFF2D2D2D
),
maxHeight:
200
,
iconDisabledColor:
Colors
.
grey
,
width:
350
,
),
decoration:
BoxDecoration
(
dropdownStyleData:
DropdownStyleData
(
borderRadius:
BorderRadius
.
circular
(
14
),
maxHeight:
200
,
color:
AppColors
.
text_field_color
,
width:
350
,
),
decoration:
BoxDecoration
(
scrollbarTheme:
ScrollbarThemeData
(
borderRadius:
BorderRadius
.
circular
(
14
),
radius:
const
Radius
.
circular
(
15
),
color:
AppColors
.
text_field_color
,
thickness:
MaterialStateProperty
.
all
<
double
>(
6
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
scrollbarTheme:
ScrollbarThemeData
(
menuItemStyleData:
const
MenuItemStyleData
(
radius:
const
Radius
.
circular
(
15
),
height:
40
,
thickness:
padding:
MaterialStateProperty
.
all
<
double
>(
6
),
EdgeInsets
.
only
(
left:
14
,
right:
14
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
],
],
),
),
SizedBox
(
height:
5
,),
ErrorWidget
(
context
,
provider
.
statusError
),
if
(
provider
.
statusID
!.
isNotEmpty
)...[
if
(
provider
.
statusID
!=
"Pending"
)...[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"FSR Number"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
SizedBox
(
height:
5
,),
Container
(
ErrorWidget
(
context
,
provider
.
statusError
),
height:
50
,
if
(
provider
.
statusID
!.
isNotEmpty
)...[
if
(
provider
.
statusID
!=
"Pending"
)...[
alignment:
Alignment
.
center
,
Padding
(
decoration:
BoxDecoration
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
color:
AppColors
.
text_field_color
,
child:
Text
(
borderRadius:
"FSR Number"
,
BorderRadius
.
circular
(
14
),
style:
TextStyle
(
),
fontFamily:
"JakartaMedium"
,
child:
Padding
(
color:
AppColors
.
semi_black
,
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
provider
.
fsrNumberController
,
keyboardType:
TextInputType
.
text
,
onChanged:
(
value
)
{
provider
.
fsrError
=
""
;
},
decoration:
InputDecoration
(
hintText:
"Enter FSR Number"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
SizedBox
(
height:
5
,),
ErrorWidget
(
context
,
provider
.
fsrError
)
]
],
Row
(
children:
[
Expanded
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5.0
,
vertical:
3
),
child:
Text
(
"Select Time"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
),
Expanded
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20.0
),
child:
Text
(
"Running Hours"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
),
],
Container
(
),
Row
(
children:
[
Expanded
(
child:
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
InkWell
(
onTap:
()
{
provider
.
selectTime
(
context
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Row
(
children:
[
Text
(
provider
.
selectedTime
.
hour
.
toString
()
+
":"
+
provider
.
selectedTime
.
minute
.
toString
()
??
"Enter in Time"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
),
),
]),
),
)),
),
SizedBox
(
width:
10
,),
Expanded
(
child:
Container
(
height:
50
,
height:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
...
@@ -284,130 +166,250 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -284,130 +166,250 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
provider
.
runningHours
Controller
,
provider
.
fsrNumber
Controller
,
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
provider
.
runningHours
Error
=
""
;
provider
.
fsr
Error
=
""
;
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
hintText:
"Enter
Running Hours
"
,
"Enter
FSR Number
"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
),
),
enabledBorder:
enabledBorder:
InputBorder
.
none
,
InputBorder
.
none
,
focusedBorder:
focusedBorder:
InputBorder
.
none
,
InputBorder
.
none
,
),
),
),
),
),
),
),
),
),
SizedBox
(
height:
5
,),
],
ErrorWidget
(
context
,
provider
.
fsrError
)
),
]
ErrorWidget
(
context
,
provider
.
runningHoursError
),
],
InkResponse
(
onTap:
()
{
Row
(
_showAttachmentSheet
(
context
);
children:
[
},
Expanded
(
child:
Container
(
child:
Padding
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
padding:
const
EdgeInsets
.
symmetric
(
height:
45
,
horizontal:
5.0
,
vertical:
3
),
width:
MediaQuery
child:
Text
(
.
of
(
context
)
"Select Time"
,
.
size
style:
TextStyle
(
.
width
,
fontFamily:
"JakartaMedium"
,
decoration:
BoxDecoration
(
color:
AppColors
.
semi_black
,
color:
Color
(
0xFFE6F6FF
),
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
border:
Border
.
all
(
),
color:
AppColors
.
app_blue
,
width:
0.5
)
),
),
Expanded
(
child:
Center
(
child:
Padding
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
padding:
const
EdgeInsets
.
symmetric
(
color:
AppColors
.
app_blue
horizontal:
20.0
),
),),
child:
Text
(
),
"Running Hours"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
Row
(
Padding
(
children:
[
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
Expanded
(
child:
Row
(
child:
Container
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
decoration:
BoxDecoration
(
children:
[
color:
AppColors
.
text_field_color
,
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
borderRadius:
color:
AppColors
.
semi_black
,
BorderRadius
.
circular
(
14
),
fontSize:
11
,
),
fontWeight:
FontWeight
.
w600
child:
InkWell
(
onTap:
()
{
provider
.
selectTime
(
context
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Row
(
children:
[
Text
(
provider
.
selectedTime
.
hour
.
toString
()
+
":"
+
provider
.
selectedTime
.
minute
.
toString
()
??
"Enter in Time"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
),
),
]),
),
)),
),
SizedBox
(
width:
10
,),
Expanded
(
child:
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
provider
.
runningHoursController
,
keyboardType:
TextInputType
.
text
,
onChanged:
(
value
)
{
provider
.
runningHoursError
=
""
;
},
decoration:
InputDecoration
(
hintText:
"Enter Running Hours"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
],
),
ErrorWidget
(
context
,
provider
.
runningHoursError
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
),
child:
Center
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),),
),),
InkResponse
(
),
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
),
)
],
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Feedback"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
Container
(
Padding
(
height:
150
,
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
alignment:
Alignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
decoration:
BoxDecoration
(
children:
[
color:
AppColors
.
text_field_color
,
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
borderRadius:
color:
AppColors
.
semi_black
,
BorderRadius
.
circular
(
14
),
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
),
)
],
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Feedback"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
semi_black
,
),
),
),
),
child:
Padding
(
Container
(
padding:
height:
150
,
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
alignment:
Alignment
.
center
,
child:
TextFormField
(
decoration:
BoxDecoration
(
controller:
color:
AppColors
.
text_field_color
,
provider
.
feedbackController
,
borderRadius:
maxLines:
60
,
BorderRadius
.
circular
(
14
),
keyboardType:
),
TextInputType
.
text
,
child:
Padding
(
decoration:
InputDecoration
(
padding:
const
EdgeInsets
.
fromLTRB
(
hintText:
10.0
,
0.0
,
10
,
0
),
"Enter Feedback"
,
child:
TextFormField
(
hintStyle:
TextStyle
(
controller:
fontWeight:
FontWeight
.
w400
,
provider
.
feedbackController
,
color:
Color
(
0xFFB4BEC0
),
maxLines:
60
,
fontSize:
14
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Feedback"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
],
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/VisitDetails.dart
View file @
d24e453e
...
@@ -43,251 +43,253 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -43,251 +43,253 @@ class _VisitdetailsState extends State<Visitdetails> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Visit Details"
),
appBar:
appbar
(
context
,
"Visit Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
SizedBox
(
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
Text
(
"Customer Details"
),
children:
[
Container
(
Text
(
"Customer Details"
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
),
child:
Column
(
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
List
.
generate
(
4
,
(
j
)
{
crossAxisAlignment:
CrossAxisAlignment
.
start
,
final
textheads
=
[
children:
List
.
generate
(
4
,
(
j
)
{
"
${customerDetails.cname}
"
,
final
textheads
=
[
"Mobile Number"
,
"
${customerDetails.cname}
"
,
"Contact Person Number"
,
"Mobile Number"
,
"Mail ID"
,
"Contact Person Number"
,
];
"Mail ID"
,
final
textSubheads
=
[
];
customerDetails
.
aname
??
"-"
,
final
textSubheads
=
[
customerDetails
.
mob1
??
"-"
,
customerDetails
.
aname
??
"-"
,
customerDetails
.
mob2
??
"-"
,
customerDetails
.
mob1
??
"-"
,
customerDetails
.
mail
??
"-"
,
customerDetails
.
mob2
??
"-"
,
];
customerDetails
.
mail
??
"-"
,
return
Container
(
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
6
,
),
horizontal:
0
,
child:
Row
(
),
mainAxisAlignment:
child:
Row
(
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
children:
[
MainAxisAlignment
.
spaceBetween
,
if
(
j
==
0
)
...[
children:
[
SvgPicture
.
asset
(
if
(
j
==
0
)
...[
"assets/svg/se_block_head.svg"
,
SvgPicture
.
asset
(
),
"assets/svg/se_block_head.svg"
,
SizedBox
(
width:
5
),
),
],
SizedBox
(
width:
5
),
Expanded
(
],
child:
SizedBox
(
Expanded
(
child:
Column
(
child:
SizedBox
(
crossAxisAlignment:
child:
Column
(
CrossAxisAlignment
.
start
,
crossAxisAlignment:
children:
[
CrossAxisAlignment
.
start
,
Text
(
textheads
[
j
].
toString
(),
children:
[
maxLines:
2
,
Text
(
textheads
[
j
].
toString
(),
overflow:
TextOverflow
.
ellipsis
,),
maxLines:
2
,
SizedBox
(
overflow:
TextOverflow
.
ellipsis
,),
// height:45,
SizedBox
(
width:
// height:45,
MediaQuery
.
of
(
width:
context
,
MediaQuery
.
of
(
).
size
.
width
*
context
,
0.75
,
).
size
.
width
*
child:
Text
(
0.75
,
textSubheads
[
j
],
child:
Text
(
maxLines:
2
,
textSubheads
[
j
],
overflow:
maxLines:
2
,
TextOverflow
.
ellipsis
,
overflow:
style:
TextStyle
(
TextOverflow
.
ellipsis
,
color:
Color
(
0xFF818181
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
),
Text
(
"Generator Details"
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
children:
[
Text
(
"Generator Details"
),
Row
(
Container
(
children:
[
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
SvgPicture
.
asset
(
"assetName"
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
Column
(
decoration:
BoxDecoration
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
color:
Colors
.
white
,
children:
List
.
generate
(
6
,
(
j
)
{
borderRadius:
BorderRadius
.
circular
(
20
),
final
textheads
=
[
),
"Gen ID"
,
child:
Column
(
"Engine Number"
,
children:
[
"Address"
,
Row
(
"Product Name"
,
children:
[
"Engine Model"
,
SvgPicture
.
asset
(
"assetName"
),
"Date Of Supply"
,
Column
(
];
crossAxisAlignment:
CrossAxisAlignment
.
start
,
final
textSubheads
=
[
children:
List
.
generate
(
6
,
(
j
)
{
"
${generatorDetails.genHashId}
"
,
final
textheads
=
[
"
${generatorDetails.engineNo}
"
,
"Gen ID"
,
"
${generatorDetails.address}
"
,
"Engine Number"
,
"
${generatorDetails.spname}
"
,
"Address"
,
"
${generatorDetails.engineModel}
"
,
"Product Name"
,
"
${complaintDetails.dateOfSupply}
"
,
"Engine Model"
,
];
"Date Of Supply"
,
return
Container
(
];
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
final
textSubheads
=
[
child:
Column
(
"
${generatorDetails.genHashId}
"
,
children:
[
"
${generatorDetails.engineNo}
"
,
Row
(
"
${generatorDetails.address}
"
,
mainAxisAlignment:
"
${generatorDetails.spname}
"
,
MainAxisAlignment
.
spaceBetween
,
"
${generatorDetails.engineModel}
"
,
children:
[
"
${complaintDetails.dateOfSupply}
"
,
Container
(
];
padding:
EdgeInsets
.
symmetric
(
return
Container
(
vertical:
3
,
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
horizontal:
0
,
child:
Column
(
),
children:
[
child:
Column
(
Row
(
crossAxisAlignment:
mainAxisAlignment:
CrossAxisAlignment
.
start
,
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
textheads
[
j
].
toString
()),
Container
(
SizedBox
(
padding:
EdgeInsets
.
symmetric
(
// height:45,
vertical:
3
,
width:
horizontal:
0
,
MediaQuery
.
of
(
),
context
,
child:
Column
(
).
size
.
width
*
crossAxisAlignment:
0.8
,
CrossAxisAlignment
.
start
,
child:
Text
(
children:
[
textSubheads
[
j
],
Text
(
textheads
[
j
].
toString
()),
maxLines:
2
,
SizedBox
(
overflow:
// height:45,
TextOverflow
.
ellipsis
,
width:
style:
TextStyle
(
MediaQuery
.
of
(
color:
Color
(
0xFF818181
),
context
,
).
size
.
width
*
0.8
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
],
],
),
),
],
],
),
),
);
);
}),
}),
),
),
],
],
),
),
],
],
),
),
),
Text
(
"Complaint Details"
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
children:
[
Text
(
"Complaint Details"
),
Row
(
Container
(
children:
[
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
SvgPicture
.
asset
(
"assetName"
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
Column
(
decoration:
BoxDecoration
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
color:
Colors
.
white
,
children:
List
.
generate
(
4
,
(
j
)
{
borderRadius:
BorderRadius
.
circular
(
20
),
final
textheads
=
[
),
"Complaint ID"
,
child:
Column
(
"Complaint Description"
,
children:
[
"Opened Date"
,
Row
(
"Complaint Type"
,
children:
[
];
SvgPicture
.
asset
(
"assetName"
),
final
textSubheads
=
[
Column
(
"
${complaintDetails.complaintId}
"
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
"
${complaintDetails.complaintDesc}
"
,
children:
List
.
generate
(
4
,
(
j
)
{
"
${complaintDetails.openedDate}
"
,
final
textheads
=
[
"
${complaintDetails.complaintType}
"
,
"Complaint ID"
,
];
"Complaint Description"
,
return
Container
(
"Opened Date"
,
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
"Complaint Type"
,
child:
Column
(
];
children:
[
final
textSubheads
=
[
Row
(
"
${complaintDetails.complaintId}
"
,
mainAxisAlignment:
"
${complaintDetails.complaintDesc}
"
,
MainAxisAlignment
.
spaceBetween
,
"
${complaintDetails.openedDate}
"
,
children:
[
"
${complaintDetails.complaintType}
"
,
Container
(
];
padding:
EdgeInsets
.
symmetric
(
return
Container
(
vertical:
3
,
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
horizontal:
0
,
child:
Column
(
),
children:
[
child:
Column
(
Row
(
crossAxisAlignment:
mainAxisAlignment:
CrossAxisAlignment
.
start
,
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
textheads
[
j
].
toString
()),
Container
(
SizedBox
(
padding:
EdgeInsets
.
symmetric
(
// height:45,
vertical:
3
,
width:
horizontal:
0
,
MediaQuery
.
of
(
),
context
,
child:
Column
(
).
size
.
width
*
crossAxisAlignment:
0.8
,
CrossAxisAlignment
.
start
,
child:
Text
(
children:
[
textSubheads
[
j
],
Text
(
textheads
[
j
].
toString
()),
maxLines:
2
,
SizedBox
(
overflow:
// height:45,
TextOverflow
.
ellipsis
,
width:
style:
TextStyle
(
MediaQuery
.
of
(
color:
Color
(
0xFF818181
),
context
,
).
size
.
width
*
0.8
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
)
,
]
,
]
,
)
,
)
,
]
,
]
,
)
,
)
,
)
;
);
}),
}
),
),
)
,
]
,
]
,
)
,
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
75
),
SizedBox
(
height:
75
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/scanComplaintDetails.dart
View file @
d24e453e
...
@@ -41,62 +41,64 @@ class _ScancomplaintdetailsState extends State<Scancomplaintdetails> {
...
@@ -41,62 +41,64 @@ class _ScancomplaintdetailsState extends State<Scancomplaintdetails> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Pending Complaints"
),
appBar:
appbar
(
context
,
"Pending Complaints"
),
body:
Container
(
body:
SafeArea
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Container
(
child:
Column
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
children:
[
child:
Column
(
Spacer
(),
children:
[
Container
(
Spacer
(),
height:
250
,
Container
(
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
key:
provider
.
scannerKey
,
provider
.
onQRViewCreated
(
p0
,
"pendingComplaints"
,
context
);
onQRViewCreated:
(
p0
)
{
},
provider
.
onQRViewCreated
(
p0
,
"pendingComplaints"
,
context
);
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
},
cameraFacing:
CameraFacing
.
back
,
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderColor:
AppColors
.
app_blue
,
borderLength:
60
,
borderRadius:
20
,
borderWidth:
10
,
borderLength:
60
,
cutOutSize:
250.0
,
borderWidth:
10
,
cutOutSize:
250.0
,
),
),
),
),
),
),
SizedBox
(
height:
25
),
SizedBox
(
height:
25
),
Text
(
Text
(
"Scan QR"
,
"Scan QR"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
),
),
Text
(
Text
(
"to open Complaints"
,
"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
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
),
),
Spacer
(),
SizedBox
(
height:
50
),
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
),
],
),
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/serviceEngineerDashboard.dart
View file @
d24e453e
...
@@ -94,223 +94,225 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
...
@@ -94,223 +94,225 @@ class _ServiceengineerdashboardState extends State<Serviceengineerdashboard> {
),
),
),
),
),
),
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
children:
[
child:
Column
(
Container
(
children:
[
margin:
EdgeInsets
.
only
(
top:
0
,
bottom:
15
),
Container
(
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
only
(
top:
0
,
bottom:
15
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
vertical
(
color:
Colors
.
white
,
bottom:
Radius
.
circular
(
16
),
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
16
),
),
),
),
),
child:
Column
(
child:
Column
(
children:
[
children:
[
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
Pendingcomplaints
(),
builder:
(
context
)
=>
Pendingcomplaints
(),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
),
);
margin:
EdgeInsets
.
symmetric
(
},
horizontal:
10
,
child:
Container
(
vertical:
15
,
padding:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
decoration:
BoxDecoration
(
vertical:
15
,
color:
Color
(
0xFFFFEFEF
),
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
child:
Row
(
vertical:
15
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
),
children:
[
decoration:
BoxDecoration
(
Expanded
(
color:
Color
(
0xFFFFEFEF
),
child:
SizedBox
(
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Column
(
),
crossAxisAlignment:
child:
Row
(
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Text
(
Expanded
(
"
${provider.pendingComplaints}
"
,
child:
SizedBox
(
style:
TextStyle
(
child:
Column
(
fontSize:
30
,
crossAxisAlignment:
color:
Color
(
0xFFED3424
),
CrossAxisAlignment
.
center
,
),
children:
[
Text
(
"
${provider.pendingComplaints}
"
,
style:
TextStyle
(
fontSize:
30
,
color:
Color
(
0xFFED3424
),
),
),
),
Text
(
"Pending Complaints"
),
Text
(
"Pending Complaints"
)
,
]
,
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
),
Container
(
padding:
EdgeInsets
.
only
(
left:
15
),
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Collections & Visits"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontFamily:
"JakartaMedium"
,
fontSize:
14
),
),
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
Container
(
child:
GridView
.
builder
(
padding:
EdgeInsets
.
only
(
left:
15
),
padding:
EdgeInsets
.
symmetric
(
alignment:
Alignment
.
topLeft
,
vertical:
15
,
child:
Text
(
horizontal:
10
,
"Collections & Visits"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontFamily:
"JakartaMedium"
,
fontSize:
14
),
),
),
itemCount:
4
,
),
shrinkWrap:
true
,
Container
(
physics:
NeverScrollableScrollPhysics
(),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
decoration:
BoxDecoration
(
crossAxisCount:
2
,
color:
Colors
.
white
,
crossAxisSpacing:
10
,
borderRadius:
BorderRadius
.
circular
(
16
),
mainAxisSpacing:
10
,
childAspectRatio:
22
/
10
,
),
),
itemBuilder:
(
context
,
index
)
{
final
numbers
=
[
child:
GridView
.
builder
(
provider
.
monthlyPaymentCollectionAmount
,
padding:
EdgeInsets
.
symmetric
(
provider
.
paymentCollectionWalletBalanceAmount
,
vertical:
15
,
provider
.
thisMonthsVisits
,
horizontal:
10
,
provider
.
todayVisits
,
),
];
itemCount:
4
,
final
names
=
[
shrinkWrap:
true
,
"Month Collection"
,
physics:
NeverScrollableScrollPhysics
(),
"P.C. Wallet"
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
"Month Visits"
,
crossAxisCount:
2
,
"Today Visits"
,
crossAxisSpacing:
10
,
];
mainAxisSpacing:
10
,
final
List
<
int
>
colorCodes
=
[
childAspectRatio:
22
/
10
,
0xFFE7FFE5
,
),
0xFFFFFCD5
,
itemBuilder:
(
context
,
index
)
{
0xFFF3EDFF
,
final
numbers
=
[
0xFFFFF6F0
,
provider
.
monthlyPaymentCollectionAmount
,
];
provider
.
paymentCollectionWalletBalanceAmount
,
final
List
<
int
>
textColorCodes
=
[
provider
.
thisMonthsVisits
,
0xFF0D9C00
,
provider
.
todayVisits
,
0xFF605C00
,
];
0xFF493272
,
final
names
=
[
0xFF91481B
,
"Month Collection"
,
];
"P.C. Wallet"
,
return
InkResponse
(
"Month Visits"
,
onTap:
()
{
"Today Visits"
,
var
route
;
];
switch
(
index
)
{
final
List
<
int
>
colorCodes
=
[
case
0
:
0xFFE7FFE5
,
route
=
Monthlycollection
();
0xFFFFFCD5
,
break
;
0xFFF3EDFF
,
case
1
:
0xFFFFF6F0
,
route
=
Pcwallet
();
];
break
;
final
List
<
int
>
textColorCodes
=
[
case
2
:
0xFF0D9C00
,
route
=
Todaymontlyvisists
(
visitType:
"Month"
);
0xFF605C00
,
break
;
0xFF493272
,
case
3
:
0xFF91481B
,
route
=
Todaymontlyvisists
(
visitType:
"Today"
);
];
break
;
return
InkResponse
(
}
onTap:
()
{
var
route
;
Navigator
.
push
(
switch
(
index
)
{
context
,
case
0
:
MaterialPageRoute
(
builder:
(
context
)
=>
route
),
route
=
Monthlycollection
();
);
break
;
},
case
1
:
child:
Container
(
route
=
Pcwallet
();
padding:
EdgeInsets
.
only
(
break
;
left:
15
,
case
2
:
top:
5
,
route
=
Todaymontlyvisists
(
visitType:
"Month"
);
bottom:
5
,
break
;
),
case
3
:
decoration:
BoxDecoration
(
route
=
Todaymontlyvisists
(
visitType:
"Today"
);
color:
Color
(
colorCodes
[
index
]),
break
;
borderRadius:
BorderRadius
.
circular
(
12
),
}
),
child:
Column
(
Navigator
.
push
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
context
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
MaterialPageRoute
(
builder:
(
context
)
=>
route
),
children:
[
);
Row
(
},
child:
Container
(
children:
[
padding:
EdgeInsets
.
only
(
if
([
0
,
1
].
contains
(
index
))...[
left:
15
,
Text
(
"₹"
,
style:
TextStyle
(
top:
5
,
fontSize:
14
,
bottom:
5
,
color:
Color
(
textColorCodes
[
index
]),
),
),),
decoration:
BoxDecoration
(
],
color:
Color
(
colorCodes
[
index
]),
Padding
(
borderRadius:
BorderRadius
.
circular
(
12
),
padding:
EdgeInsets
.
only
(
top:
5
),
),
child:
Text
(
child:
Column
(
"
${numbers[index].toString()}
"
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
style:
TextStyle
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
fontSize:
27
,
children:
[
color:
Color
(
textColorCodes
[
index
]),
Row
(
children:
[
if
([
0
,
1
].
contains
(
index
))...[
Text
(
"₹"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
textColorCodes
[
index
]),
),),
],
Padding
(
padding:
EdgeInsets
.
only
(
top:
5
),
child:
Text
(
"
${numbers[index].toString()}
"
,
style:
TextStyle
(
fontSize:
27
,
color:
Color
(
textColorCodes
[
index
]),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
Text
(
names
[
index
],
style:
TextStyle
(
Text
(
names
[
index
],
style:
TextStyle
(
color:
Color
(
0xFF818181
)
color:
Color
(
0xFF818181
)
),),
),)
,
]
,
]
,
)
,
),
),
),
);
);
},
},
),
),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Nearbygenerators
(),));
},
child:
Container
(
height:
60
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
),
child:
Row
(
InkResponse
(
children:
[
onTap:
()
{
Expanded
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Nearbygenerators
(),));
flex:
1
,
},
child:
SvgPicture
.
asset
(
child:
Container
(
"assets/svg/find_generator.svg"
,
height:
60
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/find_generator.svg"
,
),
),
),
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Find Nearby Generators"
)
,
child:
Text
(
"Find Nearby Generators"
),
),
)
,
]
,
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/splash.dart
View file @
d24e453e
...
@@ -141,18 +141,20 @@ class _SplashState extends State<Splash> {
...
@@ -141,18 +141,20 @@ class _SplashState extends State<Splash> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
body:
Consumer
<
SplashVersionNotifier
>(
body:
SafeArea
(
builder:
(
context
,
value
,
child
)
{
child:
Consumer
<
SplashVersionNotifier
>(
return
Container
(
builder:
(
context
,
value
,
child
)
{
alignment:
Alignment
.
center
,
return
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
300
,
child:
Container
(
width:
300
,
alignment:
Alignment
.
center
,
child:
splashImage
,
height:
300
,
),
width:
300
,
);
child:
splashImage
,
},
),
);
},
),
),
),
);
);
}
}
...
...
lib/services/api_calling.dart
View file @
d24e453e
...
@@ -1652,7 +1652,9 @@ class ApiCalling {
...
@@ -1652,7 +1652,9 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
paymentRequesitionPaymentsListUrl
,
{});
final
res
=
await
post
(
data
,
paymentRequesitionPaymentsListUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
print
(
data
);
print
(
"payment req:
${res.body}
"
);
return
paymentRequisitionPaymentsListResponse
.
fromJson
(
return
paymentRequisitionPaymentsListResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
jsonDecode
(
res
.
body
),
);
);
...
...
Prev
1
2
3
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