Commit 402026c6 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

05-08-2025 By Sai Srinivas

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