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
402026c6
Commit
402026c6
authored
Aug 06, 2025
by
Sai Srinivas
Browse files
05-08-2025 By Sai Srinivas
Service Inventory and Gen Tracker Modules.
parent
b2b7af29
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/screens/genTracker/GeneratorDetails.dart
View file @
402026c6
...
...
@@ -32,11 +32,9 @@ class Generatordetails extends StatefulWidget {
}
class
_GeneratordetailsState
extends
State
<
Generatordetails
>
{
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
@override
void
initState
()
{
// TODO: implement initState
...
...
@@ -126,11 +124,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
default
:
connection
=
'Offline'
;
}
return
Consumer2
<
Generatordetailsprovider
,
HomescreenNotifier
>(
return
Consumer2
<
Generatordetailsprovider
,
HomescreenNotifier
>(
builder:
(
context
,
provider
,
Homeprovider
,
child
)
{
print
(
"cojomdspofjfm:
${provider.complaintsList.length}
"
);
var
sendwidget
=
SizedBox
(
width:
0
);
return
WillPopScope
(
...
...
@@ -139,7 +134,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2New
(
...
...
@@ -147,7 +142,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
"Generator Details"
,
provider
.
resetForm
,
sendwidget
,
0xFFFFFFFF
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
...
...
@@ -156,7 +151,10 @@ class _GeneratordetailsState extends State<Generatordetails> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Card
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
2
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
2
,
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
...
...
@@ -167,10 +165,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
5
,
...
...
@@ -219,16 +214,12 @@ class _GeneratordetailsState extends State<Generatordetails> {
],
),
),
],
),
),
Visibility
(
visible:
provider
.
showMoreDetails
?
true
:
false
,
visible:
provider
.
showMoreDetails
?
true
:
false
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
...
...
@@ -245,7 +236,9 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -273,7 +266,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
4
,
(
j
)
{
final
textheads
=
[
"Mobile Number"
,
...
...
@@ -300,16 +294,19 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
),
),
),
),
SizedBox
(
width:
5
),
if
(
textSubheads
[
j
]
==
"View"
)
...[
if
(
textSubheads
[
j
]
==
"View"
)
...[
Expanded
(
flex:
2
,
child:
Container
(
...
...
@@ -318,7 +315,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
child:
InkWell
(
onTap:
()
async
{
if
(
widget
.
genLocation
!=
if
(
widget
.
genLocation
!=
null
)
{
provider
.
genLocationLatLngs
=
widget
.
genLocation
...
...
@@ -326,7 +324,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
.
toString
();
}
else
{
provider
.
genLocationLatLngs
=
provider
.
genLocation
provider
.
genLocation
?.
split
(
","
)
.
toString
();
}
...
...
@@ -342,7 +341,9 @@ class _GeneratordetailsState extends State<Generatordetails> {
if
(
await
canLaunch
(
uri
.
toString
(),
))
{
await
launch
(
uri
.
toString
());
await
launch
(
uri
.
toString
(),
);
}
else
{
throw
'Could not launch
${uri.toString()}
'
;
}
...
...
@@ -350,15 +351,22 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
textAlign:
TextAlign
.
right
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
right
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
TextDecoration
.
underline
,
decorationColor:
AppColors
.
app_blue
,
AppColors
.
app_blue
,
),
),
),
...
...
@@ -369,15 +377,20 @@ class _GeneratordetailsState extends State<Generatordetails> {
flex:
2
,
child:
InkResponse
(
onTap:
textheads
[
j
]
!=
"Mobile Number"
textheads
[
j
]
!=
"Mobile Number"
?
null
:
()
async
{
final
Uri
phoneUri
=
Uri
(
final
Uri
phoneUri
=
Uri
(
scheme:
'tel'
,
path:
provider
.
mob1
==
""
?
provider
.
mob2
:
provider
.
mob1
,
provider
.
mob1
==
""
?
provider
.
mob2
:
provider
.
mob1
,
);
if
(
await
canLaunchUrl
(
...
...
@@ -396,20 +409,28 @@ class _GeneratordetailsState extends State<Generatordetails> {
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
right
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
color:
textheads
[
j
]
==
"Mobile Number"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
decorationColor:
textheads
[
j
]
==
"Mobile Number"
?
AppColors
.
app_blue
?
AppColors
.
app_blue
:
null
,
decoration:
textheads
[
j
]
==
...
...
@@ -430,7 +451,9 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -457,7 +480,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
6
,
(
j
)
{
final
textheads
=
[
"Product Name"
,
...
...
@@ -481,7 +505,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
horizontal:
0
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
...
...
@@ -489,7 +514,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
),
),
),
...
...
@@ -502,12 +528,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
textAlign:
TextAlign
.
right
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
right
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
),
),
),
...
...
@@ -517,8 +546,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
}),
),
],
),
),
...
...
@@ -529,14 +556,10 @@ class _GeneratordetailsState extends State<Generatordetails> {
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
...
...
@@ -564,9 +587,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
),
],
),
),
...
...
@@ -593,7 +613,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
...
...
@@ -644,7 +663,10 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Text
(
provider
.
contactsList
[
l
]
.
name
==
""
?
"-"
:
provider
.
name
==
""
?
"-"
:
provider
.
contactsList
[
l
]
.
name
??
"-"
,
...
...
@@ -661,7 +683,13 @@ class _GeneratordetailsState extends State<Generatordetails> {
Expanded
(
flex:
2
,
child:
InkResponse
(
onTap:
provider
.
contactsList
[
l
].
mob2
==
""
?
null
:
()
{
onTap:
provider
.
contactsList
[
l
]
.
mob2
==
""
?
null
:
()
{
launch
(
'tel://
${provider.contactsList[l].mob2}
'
,
);
...
...
@@ -669,7 +697,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Text
(
textAlign:
TextAlign
.
right
,
provider
.
contactsList
[
l
].
mob2
==
""
?
"-"
:
provider
.
contactsList
[
l
].
mob2
??
"-"
,
provider
.
contactsList
[
l
]
.
mob2
==
""
?
"-"
:
provider
.
contactsList
[
l
]
.
mob2
??
"-"
,
style:
TextStyle
(
height:
1
,
decorationColor:
...
...
@@ -694,13 +730,14 @@ class _GeneratordetailsState extends State<Generatordetails> {
],
),
Text
(
provider
.
contactsList
[
l
].
mail
??
"-"
,
provider
.
contactsList
[
l
]
.
mail
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
color:
AppColors
.
grey_semi
,
),
),
],
...
...
@@ -735,7 +772,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
width:
double
.
infinity
,
height:
300
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
...
...
@@ -747,9 +783,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
300
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.92
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.92
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -758,9 +792,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
Column
(
children:
[
...
...
@@ -783,8 +815,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
...
...
@@ -805,8 +836,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
...
...
@@ -820,8 +850,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
...
...
@@ -833,8 +862,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
Expanded
(
flex:
3
,
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
...
...
@@ -845,19 +873,17 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
horizontal:
5
,
vertical:
10
,
),
child:
Text
(
"
${provider.scheduleList[lp].status ?? "-"}
"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
Color
(
0xFF586000
,
),
...
...
@@ -885,8 +911,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
"Complaint Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -895,8 +920,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -908,16 +932,14 @@ class _GeneratordetailsState extends State<Generatordetails> {
final
heads
=
[
"Complaint Type"
,
"Complaint ID"
,
"Service Schedule ID"
"Service Schedule ID"
,
];
final
subHeads
=
[
provider
.
scheduleList
[
lp
]
.
complaintType
??
"-"
,
provider
.
scheduleList
[
lp
]
.
complaintId
??
provider
.
scheduleList
[
lp
].
complaintId
??
"-"
,
provider
.
scheduleList
[
lp
]
...
...
@@ -937,19 +959,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
subHeads
[
j
]
==
""
...
...
@@ -977,8 +995,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
"Remarks"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -987,8 +1004,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -1002,9 +1018,13 @@ class _GeneratordetailsState extends State<Generatordetails> {
"Feedback Status"
,
];
final
subHeads
=
[
provider
.
scheduleList
[
lp
].
complaintDescription
??
provider
.
scheduleList
[
lp
]
.
complaintDescription
??
"-"
,
provider
.
scheduleList
[
lp
].
feedbackStatus
??
provider
.
scheduleList
[
lp
]
.
feedbackStatus
??
"-"
,
];
return
Container
(
...
...
@@ -1020,19 +1040,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
...
...
@@ -1055,7 +1071,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
],
if
(
provider
.
complaintsList
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -1074,7 +1089,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
width:
double
.
infinity
,
height:
220
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
...
...
@@ -1086,9 +1100,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
220
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.92
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.92
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -1097,9 +1109,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
Column
(
children:
[
...
...
@@ -1122,8 +1132,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
...
...
@@ -1144,8 +1153,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
...
...
@@ -1159,8 +1167,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
...
...
@@ -1172,8 +1179,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
Expanded
(
flex:
3
,
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
...
...
@@ -1184,19 +1190,17 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
horizontal:
5
,
vertical:
10
,
),
child:
Text
(
"
${provider.complaintsList[lp].openStatus ?? "-"}
"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
Color
(
0xFF586000
,
),
...
...
@@ -1224,8 +1228,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
"Complaint Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -1234,8 +1237,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -1254,9 +1256,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
.
complaintsList
[
lp
]
.
complaintCategoryName
??
"-"
,
provider
.
complaintsList
[
lp
]
.
createdBy
??
provider
.
complaintsList
[
lp
].
createdBy
??
"-"
,
provider
.
complaintsList
[
lp
]
...
...
@@ -1276,19 +1276,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
subHeads
[
j
]
==
""
...
...
@@ -1312,7 +1308,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
],
InkWell
(
onTap:
()
{
Navigator
.
push
(
...
...
@@ -1326,7 +1321,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -1353,7 +1347,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
width:
40
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Color
(
0xFFE6F6FF
)
color:
Color
(
0xFFE6F6FF
)
,
),
child:
SvgPicture
.
asset
(
"assets/svg/gent_tag_loc.svg"
,
...
...
@@ -1362,7 +1356,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Tag Location"
,
style:
TextStyle
(
...
...
@@ -1373,7 +1367,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
SizedBox
(
width:
10
),
],
),
),
...
...
@@ -1387,7 +1380,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -1414,7 +1406,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
width:
40
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Color
(
0xFFE6F6FF
)
color:
Color
(
0xFFE6F6FF
)
,
),
child:
SvgPicture
.
asset
(
"assets/svg/gent_tag_den.svg"
,
...
...
@@ -1423,7 +1415,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Tag Generator"
,
style:
TextStyle
(
...
...
@@ -1434,7 +1426,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
SizedBox
(
width:
10
),
],
),
),
...
...
@@ -1459,7 +1450,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
// );
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -1479,14 +1469,13 @@ class _GeneratordetailsState extends State<Generatordetails> {
// borderRadius: BorderRadius.circular(15.0),
// ),
child:
Row
(
children:
[
Container
(
height:
40
,
width:
40
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Color
(
0xFFE6F6FF
)
color:
Color
(
0xFFE6F6FF
)
,
),
child:
SvgPicture
.
asset
(
"assets/svg/gent_reg_comp.svg"
,
...
...
@@ -1495,7 +1484,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Register Complaint"
,
style:
TextStyle
(
...
...
@@ -1507,7 +1496,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
],
),
),
...
...
@@ -1562,7 +1550,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
case
ConnectivityResult
.
mobile
:
...
...
@@ -1575,15 +1562,14 @@ class _GeneratordetailsState extends State<Generatordetails> {
default
:
connection
=
'Offline'
;
}
return
Consumer2
<
Generatordetailsprovider
,
HomescreenNotifier
>(
return
Consumer2
<
Generatordetailsprovider
,
HomescreenNotifier
>(
builder:
(
context
,
provider
,
Homeprovider
,
child
)
{
var
sendwidget
=
SizedBox
(
width:
0
);
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
...
...
@@ -1933,7 +1919,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
...
...
@@ -1965,14 +1950,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
vertical:
6
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
SizedBox
(
child:
Text
(
"
${headings[jndex]}
"
,
style:
TextStyle
(
fontSize:
14
fontSize:
14
,
),
),
),
...
...
@@ -1980,13 +1966,12 @@ class _GeneratordetailsState extends State<Generatordetails> {
Expanded
(
child:
SizedBox
(
child:
Text
(
values
[
jndex
]==
""
?
"-"
:
"
${values[jndex]}
"
,
values
[
jndex
]
==
""
?
"-"
:
"
${values[jndex]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -2021,19 +2006,20 @@ class _GeneratordetailsState extends State<Generatordetails> {
ListView
.
builder
(
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemCount:
provider
.
showMoreScheduleList
?
provider
.
scheduleList
.
length
:
1
,
itemCount:
provider
.
showMoreScheduleList
?
provider
.
scheduleList
.
length
:
1
,
itemBuilder:
(
context
,
l
)
{
final
headings1
=
[
"Employee Name"
,
"Schedule Manager Name"
,
"Due Date"
,
];
final
values1
=
[
provider
.
scheduleList
[
l
].
name
,
provider
.
scheduleList
[
l
].
scheduleManagerName
,
provider
.
scheduleList
[
l
].
dueDate
,
];
final
headings2
=
[
...
...
@@ -2059,23 +2045,16 @@ class _GeneratordetailsState extends State<Generatordetails> {
provider
.
scheduleList
[
l
].
status
,
provider
.
scheduleList
[
l
].
feedbackStatus
,
];
var
headings
=
[
...
headings1
];
var
values
=
[
...
values1
];
if
(
provider
.
showMoreScheduleDetails
){
headings
=
[...
headings1
,...
headings2
];
values
=
[...
values1
,...
values2
];
var
headings
=
[...
headings1
];
var
values
=
[...
values1
];
if
(
provider
.
showMoreScheduleDetails
)
{
headings
=
[...
headings1
,
...
headings2
];
values
=
[...
values1
,
...
values2
];
}
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
...
...
@@ -2087,22 +2066,24 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
child:
Column
(
children:
[
...
List
.
generate
(
headings
.
length
,
(
jndex
)
{
...
List
.
generate
(
headings
.
length
,
(
jndex
,
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
6
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
SizedBox
(
child:
Text
(
"
${headings[jndex]}
"
,
style:
TextStyle
(
fontSize:
14
fontSize:
14
,
),
),
),
...
...
@@ -2110,13 +2091,12 @@ class _GeneratordetailsState extends State<Generatordetails> {
Expanded
(
child:
SizedBox
(
child:
Text
(
values
[
jndex
]==
""
?
"-"
:
"
${values[jndex]}
"
,
values
[
jndex
]
==
""
?
"-"
:
"
${values[jndex]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -2127,7 +2107,8 @@ class _GeneratordetailsState extends State<Generatordetails> {
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreScheduleDetails
=
!
provider
.
showMoreScheduleDetails
;
provider
.
showMoreScheduleDetails
=
!
provider
.
showMoreScheduleDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -2140,14 +2121,15 @@ class _GeneratordetailsState extends State<Generatordetails> {
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreScheduleDetails
?
"- Show Less"
:
"+ More Details"
,
provider
.
showMoreScheduleDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
...
...
@@ -2159,23 +2141,22 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
},
),
if
(
provider
.
scheduleList
.
length
>
1
)...[
if
(
provider
.
scheduleList
.
length
>
1
)
...[
InkResponse
(
onTap:
()
async
{
provider
.
showMoreScheduleList
=
!
provider
.
showMoreScheduleList
;
provider
.
showMoreScheduleList
=
!
provider
.
showMoreScheduleList
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreScheduleList
?
" Show Less"
:
" Show More"
,
provider
.
showMoreScheduleList
?
" Show Less"
:
" Show More"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -2183,19 +2164,21 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
Transform
.
rotate
(
angle:
provider
.
showMoreScheduleList
?
180
*
3.14159
/
180
:
0
*
3.14159
/
180
,
angle:
provider
.
showMoreScheduleList
?
180
*
3.14159
/
180
:
0
*
3.14159
/
180
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
color:
AppColors
.
app_blue
,
width:
25
,
),
),
],
),
),
),
]
]
,
],
InkWell
(
onTap:
()
{
...
...
@@ -2210,7 +2193,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -2238,7 +2220,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Tag Location"
,
style:
TextStyle
(
...
...
@@ -2267,7 +2249,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
);
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -2295,7 +2276,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Tag Generator"
,
style:
TextStyle
(
...
...
@@ -2335,7 +2316,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
// );
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -2355,7 +2335,6 @@ class _GeneratordetailsState extends State<Generatordetails> {
// borderRadius: BorderRadius.circular(15.0),
// ),
child:
Row
(
children:
[
SvgPicture
.
asset
(
"assets/svg/gent_reg_comp.svg"
,
...
...
@@ -2363,7 +2342,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
"Register Complaint"
,
style:
TextStyle
(
...
...
@@ -2450,9 +2429,11 @@ class _TagLocationScreenState extends State<TagLocationScreen> {
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
provider
.
showMoreDetails
=
false
;
});
}
...
...
@@ -2474,7 +2455,7 @@ class _TagLocationScreenState extends State<TagLocationScreen> {
backgroundColor:
AppColors
.
white
,
body:
SafeArea
(
child:
Padding
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -2484,7 +2465,7 @@ class _TagLocationScreenState extends State<TagLocationScreen> {
"Gen ID"
,
(
p0
)
{},
),
SizedBox
(
height:
10
,
),
SizedBox
(
height:
10
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
...
...
@@ -2528,7 +2509,7 @@ class _TagLocationScreenState extends State<TagLocationScreen> {
),
),
),
SizedBox
(
width:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
...
...
@@ -2548,7 +2529,7 @@ class _TagLocationScreenState extends State<TagLocationScreen> {
),
),
],
errorWidget
(
context
,
provider
.
imageError
)
errorWidget
(
context
,
provider
.
imageError
)
,
],
),
),
...
...
@@ -2565,7 +2546,7 @@ class _TagLocationScreenState extends State<TagLocationScreen> {
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15.0
),
...
...
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