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_services
Commits
97403192
"ios/git@183.82.99.133:saisrinivas/gen_services.git" did not exist on "6f73c3f4d63c6ae3df399ce0961b4b9f8f1520e7"
Commit
97403192
authored
Nov 14, 2025
by
Sai Srinivas
Committed by
Sai Srinivas
Nov 15, 2025
Browse files
Icon inserted and few changes
parent
5a62c920
Changes
57
Hide whitespace changes
Inline
Side-by-side
lib/Screens/HelpAndComplaintScreens/serviceListScreen.dart
0 → 100644
View file @
97403192
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/serviceAndJobCardListProvier.dart'
;
import
'../../Utility/AppColors.dart'
;
class
serviceListScreen
extends
StatefulWidget
{
final
accId
;
final
sessionId
;
final
complaintId
;
const
serviceListScreen
({
super
.
key
,
required
this
.
accId
,
required
this
.
sessionId
,
required
this
.
complaintId
});
@override
State
<
serviceListScreen
>
createState
()
=>
_serviceListScreenState
();
}
class
_serviceListScreenState
extends
State
<
serviceListScreen
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
provider
=
Provider
.
of
<
ServiceAndJobCardListProvider
>(
context
,
listen:
false
,
);
provider
.
fetchServiceDetailsAPI
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
complaintId
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
ServiceAndJobCardListProvider
>(
builder:
(
context
,
provider
,
child
)
{
final
isLoading
=
provider
.
isLoading
;
final
error
=
provider
.
errorMessage
;
final
response
=
provider
.
allServiceResponse
;
final
data
=
response
?.
allServiceList
??[];
List
<
String
>
serviceHeadings
=
[
"Date"
,
"In/Out Time"
,
"Running Hrs."
,
"FSR File"
,
"FSR Number"
,
"Feedback"
,
];
if
(
isLoading
)
{
return
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
child:
CircularProgressIndicator
(
color:
AppColors
.
buttonColor
),
),
);
}
if
(
error
!=
null
)
{
return
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
child:
Text
(
error
,
style:
const
TextStyle
(
color:
Colors
.
red
,
fontSize:
16
),
),
),
);
}
if
(
data
==
null
)
{
return
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
child:
Text
(
"No data found."
)),
);
}
return
RefreshIndicator
.
adaptive
(
color:
AppColors
.
amountText
,
onRefresh:
()
async
{
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
},
child:
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
CustomScrollView
(
physics:
const
BouncingScrollPhysics
(),
slivers:
[
SliverAppBar
(
stretch:
true
,
pinned:
true
,
expandedHeight:
75
,
backgroundColor:
AppColors
.
backgroundRegular
,
elevation:
0
,
// Remove shadow
automaticallyImplyLeading:
false
,
toolbarHeight:
0
,
// Remove toolbar space
collapsedHeight:
0
,
// Completely collapse to 0 height
flexibleSpace:
FlexibleSpaceBar
(
stretchModes:
const
[
StretchMode
.
fadeTitle
],
background:
Container
(
decoration:
BoxDecoration
(
gradient:
AppColors
.
balanceBarGradientA
,
),
child:
SafeArea
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
20
,
),
child:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back.svg"
,
height:
25
,
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
InkResponse
(
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
Text
(
"Service Details List"
,
overflow:
TextOverflow
.
ellipsis
,
maxLines:
1
,
style:
TextStyle
(
fontSize:
16
,
color:
Colors
.
white
,
height:
1.1
,
),
),
),
),
],
),
),
),
),
),
),
),
SliverToBoxAdapter
(
child:
Container
(
color:
Color
(
0xFF4076FF
),
child:
Container
(
decoration:
const
BoxDecoration
(
color:
AppColors
.
backgroundRegular
,
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
30
),
topRight:
Radius
.
circular
(
30
),
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
SizedBox
(
height:
4
),
ListView
.
builder
(
shrinkWrap:
true
,
physics:
const
NeverScrollableScrollPhysics
(),
itemCount:
data
!.
length
,
itemBuilder:
(
context
,
j
)
{
List
<
String
>
serviceSubHeadings
=
[
data
[
j
].
date
??
"-"
,
data
[
j
].
inOrOutTime
??
"-"
,
data
[
j
].
runningHrs
??
"-"
,
data
[
j
].
fsrExt
??
"-"
,
data
[
j
].
fsrNo
??
"-"
,
data
[
j
].
feedback
??
"-"
,
];
return
Container
(
margin:
const
EdgeInsets
.
all
(
5
),
padding:
const
EdgeInsets
.
all
(
14
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFFFFFFF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
...
List
.
generate
(
serviceHeadings
.
length
,
(
i
,
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
serviceHeadings
[
i
]
??
"-"
,
style:
const
TextStyle
(
fontSize:
14
,
color:
AppColors
.
subtitleText
,
),
),
),
Expanded
(
child:
Text
(
serviceSubHeadings
[
i
].
isEmpty
?
"-"
:
serviceSubHeadings
[
i
]
??
"-"
,
maxLines:
3
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
end
,
style:
const
TextStyle
(
fontSize:
14
,
color:
AppColors
.
nearDarkText
,
),
),
),
],
),
);
}),
SizedBox
(
height:
5
,
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
15
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE8F6FF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Expanded
(
flex:
1
,
child:
CircleAvatar
(
backgroundImage:
data
[
j
].
profileImg
==
"https://erp.gengroup.in/"
?
AssetImage
(
"assets/images/user_img.png"
):
NetworkImage
(
data
[
j
].
profileImg
!,
),
),
),
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${data[j].empName}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
14
,
),
),
Text
(
"
${data[j].techRoleName}
"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
subtitleText
,
fontSize:
12
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
List
.
generate
(
5
,
(
index
)
{
final
serviceId
=
data
[
j
].
id
?.
toString
()
??
data
[
j
].
id
.
toString
();
final
rating
=
provider
.
getRating
(
serviceId
);
final
starStates
=
provider
.
getStarStates
(
serviceId
);
return
InkWell
(
onTap:
()
async
{
final
newRating
=
index
+
1
;
provider
.
setRating
(
serviceId
,
newRating
);
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
SnackBar
(
content:
Text
(
"Submitting rating..."
),
duration:
Duration
(
seconds:
1
)),
);
await
provider
.
updateRatingForTechnician
(
widget
.
accId
,
widget
.
sessionId
,
serviceId
,
newRating
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
2
),
child:
Icon
(
Icons
.
star_rate_rounded
,
color:
starStates
[
index
]
?
const
Color
(
0xffFFB703
)
:
const
Color
(
0xffCECECE
),
size:
24
,
),
),
);
}),
),
Text
(
"Your Rating"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
subtitleText
,
fontSize:
12
,
),
),
],
),
),
),
],
),
),
],
),
);
},
),
],
),
),
),
),
],
),
),
);
},
);
}
}
lib/Screens/HomeScreen.dart
View file @
97403192
...
@@ -2,11 +2,14 @@ import 'dart:io';
...
@@ -2,11 +2,14 @@ import 'dart:io';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:gen_service/Models/DashboardResponse.dart'
;
import
'package:gen_service/Screens/ContactUsScreen.dart'
;
import
'package:gen_service/Screens/ContactUsScreen.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/ComplaintDetailsScreen.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/SelectOrderHelpScreen.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/SelectOrderHelpScreen.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/ComplaintListScreen.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/ComplaintListScreen.dart'
;
import
'package:gen_service/Screens/ProfileScreen.dart'
;
import
'package:gen_service/Screens/ProfileScreen.dart'
;
import
'package:gen_service/Screens/TransactionScreens/TransactionListScreen.dart'
;
import
'package:gen_service/Screens/TransactionScreens/TransactionListScreen.dart'
;
import
'package:gen_service/Screens/TransactionScreens/contactMap.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'package:razorpay_flutter/razorpay_flutter.dart'
;
import
'package:razorpay_flutter/razorpay_flutter.dart'
;
...
@@ -15,7 +18,6 @@ import '../Notifiers/DashboardProvider.dart';
...
@@ -15,7 +18,6 @@ import '../Notifiers/DashboardProvider.dart';
import
'../Notifiers/PayAmountProvider.dart'
;
import
'../Notifiers/PayAmountProvider.dart'
;
import
'../Utility/AppColors.dart'
;
import
'../Utility/AppColors.dart'
;
import
'../Utility/CustomSnackbar.dart'
;
import
'../Utility/CustomSnackbar.dart'
;
import
'generatorDetailsScreen.dart'
;
import
'generatorDetailsScreen.dart'
;
...
@@ -35,7 +37,6 @@ class HomeScreen extends StatefulWidget {
...
@@ -35,7 +37,6 @@ class HomeScreen extends StatefulWidget {
State
<
HomeScreen
>
createState
()
=>
_HomeScreenState
();
State
<
HomeScreen
>
createState
()
=>
_HomeScreenState
();
}
}
class
_HomeScreenState
extends
State
<
HomeScreen
>
{
class
_HomeScreenState
extends
State
<
HomeScreen
>
{
late
Razorpay
_razorpay
;
late
Razorpay
_razorpay
;
bool
?
isSuccess
;
bool
?
isSuccess
;
...
@@ -50,20 +51,23 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -50,20 +51,23 @@ class _HomeScreenState extends State<HomeScreen> {
super
.
initState
();
super
.
initState
();
_razorpay
=
Razorpay
();
_razorpay
=
Razorpay
();
Future
.
microtask
(()
{
Future
.
microtask
(()
{
final
dashboardProvider
=
final
dashboardProvider
=
Provider
.
of
<
DashboardProvider
>(
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
context
,
listen:
false
,
);
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
});
});
}
}
//_________________________________________________________
//_________________________________________________________
void
_handlePaymentSuccess
(
PaymentSuccessResponse
response
)
{
void
_handlePaymentSuccess
(
PaymentSuccessResponse
response
)
{
setState
(()
async
{
setState
(()
async
{
final
provider
=
Provider
.
of
<
PayAmountProvider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
PayAmountProvider
>(
context
,
listen:
false
);
await
provider
.
getPaymentStatus
(
await
provider
.
getPaymentStatus
(
sessionId:
widget
.
sessionId
,
sessionId:
widget
.
sessionId
,
empId:
widget
.
accId
,
empId:
widget
.
accId
,
razorpayOrderId:
response
.
orderId
.
toString
()
razorpayOrderId:
response
.
orderId
.
toString
()
,
);
);
final
data
=
provider
.
statusResponse
;
final
data
=
provider
.
statusResponse
;
// Navigator.push(
// Navigator.push(
...
@@ -104,7 +108,6 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -104,7 +108,6 @@ class _HomeScreenState extends State<HomeScreen> {
Future
<
void
>
payAmountFunction
(
String
amount
)
async
{
Future
<
void
>
payAmountFunction
(
String
amount
)
async
{
try
{
try
{
final
provider
=
Provider
.
of
<
PayAmountProvider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
PayAmountProvider
>(
context
,
listen:
false
);
await
provider
.
payAmount
(
await
provider
.
payAmount
(
...
@@ -149,7 +152,7 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -149,7 +152,7 @@ class _HomeScreenState extends State<HomeScreen> {
'description'
:
"Bill"
,
'description'
:
"Bill"
,
'currency'
:
'INR'
,
'currency'
:
'INR'
,
'method'
:
'upi'
,
'method'
:
'upi'
,
'prefill'
:
{
'contact'
:
widget
.
mobNumber
,
'email'
:
''
}
'prefill'
:
{
'contact'
:
widget
.
mobNumber
,
'email'
:
''
}
,
};
};
// print(options);
// print(options);
try
{
try
{
...
@@ -178,17 +181,15 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -178,17 +181,15 @@ class _HomeScreenState extends State<HomeScreen> {
// });
// });
// }
// }
Future
<
bool
>
_onWillPop
()
async
{
Future
<
bool
>
_onWillPop
()
async
{
DateTime
now
=
DateTime
.
now
();
DateTime
now
=
DateTime
.
now
();
if
(
currentBackPressTime
==
null
||
if
(
currentBackPressTime
==
null
||
now
.
difference
(
currentBackPressTime
!)
>
Duration
(
seconds:
2
))
{
now
.
difference
(
currentBackPressTime
!)
>
Duration
(
seconds:
2
))
{
currentBackPressTime
=
now
;
currentBackPressTime
=
now
;
CustomSnackBar
.
showExit
(
CustomSnackBar
.
showExit
(
context:
context
,
context:
context
,
title:
"Exit"
,
title:
"Exit"
,
message:
'Press back again to exit'
message:
'Press back again to exit'
,
);
);
return
false
;
return
false
;
}
}
...
@@ -196,7 +197,6 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -196,7 +197,6 @@ class _HomeScreenState extends State<HomeScreen> {
exit
(
0
);
exit
(
0
);
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
dashboardProvider
=
Provider
.
of
<
DashboardProvider
>(
context
);
final
dashboardProvider
=
Provider
.
of
<
DashboardProvider
>(
context
);
...
@@ -209,7 +209,7 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -209,7 +209,7 @@ class _HomeScreenState extends State<HomeScreen> {
return
const
Scaffold
(
return
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
body:
Center
(
child:
CircularProgressIndicator
(
color:
AppColors
.
buttonColor
,
),
child:
CircularProgressIndicator
(
color:
AppColors
.
buttonColor
),
),
),
);
);
}
}
...
@@ -218,19 +218,129 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -218,19 +218,129 @@ class _HomeScreenState extends State<HomeScreen> {
return
Scaffold
(
return
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
body:
Center
(
child:
Text
(
child:
Padding
(
error
,
padding:
const
EdgeInsets
.
all
(
24.0
),
style:
const
TextStyle
(
color:
Colors
.
red
,
fontSize:
16
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Error Icon
Container
(
width:
120
,
height:
120
,
decoration:
BoxDecoration
(
color:
Colors
.
red
.
withOpacity
(
0.1
),
shape:
BoxShape
.
circle
,
),
child:
const
Icon
(
Icons
.
error_outline_rounded
,
size:
60
,
color:
Colors
.
red
,
),
),
const
SizedBox
(
height:
24
),
// Error Title
const
Text
(
"Oops! Something went wrong"
,
style:
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
fontFamily:
"Poppins"
,
),
),
const
SizedBox
(
height:
12
),
// Error Message
Text
(
error
,
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
height:
1.4
,
),
),
const
SizedBox
(
height:
32
),
// Retry Button
ElevatedButton
.
icon
(
onPressed:
()
async
{
// Show loading state
setState
(()
{});
await
Future
.
delayed
(
const
Duration
(
milliseconds:
300
));
// Retry fetching data
final
dashboardProvider
=
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
await
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
},
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
AppColors
.
buttonColor
,
foregroundColor:
Colors
.
white
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
24
,
vertical:
12
,
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
25
),
),
elevation:
2
,
),
icon:
const
Icon
(
Icons
.
refresh_rounded
,
size:
20
),
label:
const
Text
(
"Try Again"
,
style:
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w500
,
fontFamily:
"Poppins"
,
),
),
),
const
SizedBox
(
height:
16
),
// Alternative Action
// TextButton(
// onPressed: () {
// // Go back or navigate to home
// Navigator.maybePop(context);
// },
// child: const Text(
// "Go Back",
// style: TextStyle(
// fontSize: 14,
// color: Colors.grey,
// fontFamily: "Poppins",
// ),
// ),
// ),
],
),
),
),
),
),
);
);
}
}
if
(
data
==
null
)
{
if
(
data
==
null
)
{
return
const
Scaffold
(
return
RefreshIndicator
.
adaptive
(
backgroundColor:
AppColors
.
backgroundRegular
,
color:
AppColors
.
amountText
,
body:
Center
(
onRefresh:
()
async
{
child:
Text
(
"No data found."
),
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
},
child:
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
child:
Text
(
"No data found."
)),
),
),
);
);
}
}
...
@@ -244,214 +354,267 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -244,214 +354,267 @@ class _HomeScreenState extends State<HomeScreen> {
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
},
},
child:
Scaffold
(
child:
SafeArea
(
backgroundColor:
Color
(
0xFF4076FF
),
top:
false
,
body:
CustomScrollView
(
bottom:
Platform
.
isIOS
?
false
:
true
,
physics:
ClampingScrollPhysics
(),
maintainBottomViewPadding:
true
,
slivers:
<
Widget
>[
child:
Scaffold
(
SliverAppBar
(
resizeToAvoidBottomInset:
true
,
leading:
Container
(),
backgroundColor:
Color
(
0xFF4076FF
),
stretch:
_stretch
,
body:
CustomScrollView
(
backgroundColor:
Color
(
0xFF4076FF
),
physics:
ClampingScrollPhysics
(),
onStretchTrigger:
()
async
{
slivers:
<
Widget
>[
// Refresh data when pulled down
SliverAppBar
(
final
dashboardProvider
=
leading:
Container
(),
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
stretch:
_stretch
,
dashboardProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
backgroundColor:
Color
(
0xFF4076FF
),
},
onStretchTrigger:
()
async
{
stretchTriggerOffset:
300.0
,
// Refresh data when pulled down
expandedHeight:
232.0
,
final
dashboardProvider
=
Provider
.
of
<
DashboardProvider
>(
flexibleSpace:
LayoutBuilder
(
context
,
builder:
(
context
,
constraints
)
{
listen:
false
,
final
top
=
constraints
.
biggest
.
height
;
);
return
FlexibleSpaceBar
(
dashboardProvider
.
fetchDashboard
(
stretchModes:
const
[
widget
.
accId
,
StretchMode
.
zoomBackground
,
widget
.
sessionId
,
StretchMode
.
blurBackground
,
);
],
},
background:
GestureDetector
(
stretchTriggerOffset:
300.0
,
onTap:
()
{
expandedHeight:
232.0
,
Navigator
.
push
(
flexibleSpace:
LayoutBuilder
(
context
,
builder:
(
context
,
constraints
)
{
MaterialPageRoute
(
final
top
=
constraints
.
biggest
.
height
;
builder:
(
context
)
=>
ProfileScreen
(
return
FlexibleSpaceBar
(
accId:
widget
.
accId
,
stretchModes:
const
[
sessionId:
widget
.
sessionId
,
StretchMode
.
zoomBackground
,
StretchMode
.
blurBackground
,
],
background:
GestureDetector
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ProfileScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
),
),
),
);
},
child:
Container
(
width:
double
.
infinity
,
decoration:
const
BoxDecoration
(
gradient:
AppColors
.
backgroundGradient
,
),
),
);
child:
SafeArea
(
},
bottom:
false
,
child:
Container
(
child:
Padding
(
width:
double
.
infinity
,
padding:
const
EdgeInsets
.
only
(
decoration:
const
BoxDecoration
(
gradient:
AppColors
.
backgroundGradient
),
top:
10
,
child:
SafeArea
(
bottom:
12
,
bottom:
false
,
left:
20
,
child:
Padding
(
right:
20
,
padding:
const
EdgeInsets
.
only
(
top:
10
,
bottom:
12
,
left:
20
,
right:
20
),
),
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
// Profile Image
// Profile Image
Container
(
Container
(
height:
80
,
height:
80
,
width:
80
,
width:
80
,
decoration:
const
BoxDecoration
(
decoration:
const
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
shape:
BoxShape
.
circle
,
shape:
BoxShape
.
circle
,
),
clipBehavior:
Clip
.
antiAlias
,
child:
(
data
.
userProfile
?.
isNotEmpty
==
true
)
?
Image
.
network
(
data
.
userProfile
.
toString
(),
fit:
BoxFit
.
cover
,
errorBuilder:
(
context
,
error
,
stackTrace
,
)
=>
CircleAvatar
(
radius:
40
,
backgroundColor:
const
Color
(
0xFFE0F4FF
),
child:
SvgPicture
.
asset
(
height:
40
,
"assets/svg/person_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
)
:
CircleAvatar
(
radius:
40
,
backgroundColor:
const
Color
(
0xFFE0F4FF
,
),
child:
SvgPicture
.
asset
(
height:
40
,
"assets/svg/person_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
),
),
clipBehavior:
Clip
.
antiAlias
,
const
SizedBox
(
height:
16
),
child:
(
data
.
userProfile
?.
isNotEmpty
==
true
)
Flexible
(
?
Image
.
network
(
child:
Text
(
data
.
userProfile
.
toString
(),
data
.
userName
.
toString
(),
fit:
BoxFit
.
cover
,
style:
const
TextStyle
(
errorBuilder:
(
context
,
error
,
stackTrace
)
=>
color:
Colors
.
white
,
CircleAvatar
(
fontSize:
24
,
radius:
40
,
fontWeight:
FontWeight
.
w400
,
backgroundColor:
const
Color
(
0xFFE0F4FF
),
),
child:
SvgPicture
.
asset
(
maxLines:
1
,
height:
40
,
overflow:
TextOverflow
.
ellipsis
,
"assets/svg/person_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
)
:
CircleAvatar
(
radius:
40
,
backgroundColor:
const
Color
(
0xFFE0F4FF
),
child:
SvgPicture
.
asset
(
height:
40
,
"assets/svg/person_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
),
),
),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
16
),
Text
(
Flexible
(
'+91
${data.mobNum}
'
,
child:
Text
(
style:
TextStyle
(
data
.
userName
.
toString
(),
style:
const
TextStyle
(
color:
Colors
.
white
,
fontSize:
24
,
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
white
.
withOpacity
(
0.9
),
fontSize:
16
,
),
),
maxLines:
1
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
],
const
SizedBox
(
height:
8
),
),
Text
(
'+91
${data.mobNum}
'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
white
.
withOpacity
(
0.9
),
fontSize:
16
,
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
)
],
),
),
),
),
),
),
),
),
)
,
)
;
);
},
}
,
)
,
),
),
),
// Body content
// Body content
SliverToBoxAdapter
(
SliverToBoxAdapter
(
child:
Container
(
padding:
const
EdgeInsets
.
only
(
top:
1
,
bottom:
0
),
color:
Colors
.
transparent
,
child:
Container
(
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
0
),
padding:
const
EdgeInsets
.
only
(
top:
1
,
bottom:
0
),
decoration:
const
BoxDecoration
(
color:
Colors
.
transparent
,
color:
AppColors
.
backgroundRegular
,
child:
Container
(
borderRadius:
BorderRadius
.
only
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
0
),
topLeft:
Radius
.
circular
(
30
),
decoration:
const
BoxDecoration
(
topRight:
Radius
.
circular
(
30
),
color:
AppColors
.
backgroundRegular
,
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
30
),
topRight:
Radius
.
circular
(
30
),
),
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
const
SizedBox
(
height:
20
),
const
SizedBox
(
height:
20
),
// Orders Section
// Orders Section
_buildOrdersSection
(
data
),
_buildOrdersSection
(
data
),
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
// Transactions Card
// Transactions Card
_buildTransactionsCard
(
data
),
_buildTransactionsCard
(
data
),
const
SizedBox
(
height:
18
),
const
SizedBox
(
height:
18
),
const
Divider
(),
const
Divider
(),
// Complaints Section
// Complaints Section
_buildComplaintsSection
(
data
),
_buildComplaintsSection
(
data
),
const
SizedBox
(
height:
20
),
const
SizedBox
(
height:
20
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
SelectOrderHelpScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
))
MaterialPageRoute
(
);
builder:
},
(
context
)
=>
SelectOrderHelpScreen
(
child:
Padding
(
accId:
widget
.
accId
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
14
),
sessionId:
widget
.
sessionId
,
child:
Container
(
),
padding:
const
EdgeInsets
.
all
(
20
),
),
decoration:
BoxDecoration
(
);
color:
const
Color
(
0xFFD7F0FF
),
},
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Padding
(
border:
Border
.
all
(
width:
1.5
,
color:
AppColors
.
buttonColor
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
14
),
),
child:
Container
(
child:
Row
(
padding:
const
EdgeInsets
.
all
(
20
),
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
decoration:
BoxDecoration
(
children:
[
color:
const
Color
(
0xFFD7F0FF
),
Column
(
borderRadius:
BorderRadius
.
circular
(
16
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
border:
Border
.
all
(
children:
const
[
width:
1.5
,
Text
(
'Facing Issues?'
,
color:
AppColors
.
buttonColor
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
const
[
Text
(
'Facing Issues?'
,
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
amountText
,
),
),
Text
(
'Raise a ticket to resolve your issues.'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
amountText
)),
Text
(
'Raise a ticket to resolve your issues.'
,
style:
TextStyle
(
fontSize:
12
,
fontSize:
12
,
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
subtitleText
),
color:
AppColors
.
subtitleText
,
),
),
],
),
),
],
SvgPicture
.
asset
(
"assets/svg/requirements.svg"
,
),
height:
32
,
width:
32
),
SvgPicture
.
asset
(
],
"assets/svg/requirements.svg"
,
height:
32
,
width:
32
,
),
],
),
),
),
),
),
),
),
),
const
SizedBox
(
height:
20
),
const
SizedBox
(
height:
20
),
// Get in Touch Card
// Get in Touch Card
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ContactUsScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
))
MaterialPageRoute
(
);
builder:
},
(
context
)
=>
ContactMap
(
child:
Container
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
),
),
);
},
child:
Container
(
width:
double
.
infinity
,
width:
double
.
infinity
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20
,
vertical:
22
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20
,
vertical:
22
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
amountText
,
color:
AppColors
.
amountText
,
borderRadius:
const
BorderRadius
.
only
(
borderRadius:
const
BorderRadius
.
only
(
...
@@ -460,45 +623,55 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -460,45 +623,55 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
),
),
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
'Get in touch With Us'
,
'Get in touch With Us'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Colors
.
white
),
color:
Colors
.
white
,
),
),
),
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
Text
(
Text
(
'Please feel free to reach out to us anytime'
,
'Please feel free to reach out to us anytime'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
12
,
fontSize:
12
,
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xAAFFFFFF
)),
color:
Color
(
0xAAFFFFFF
),
),
),
),
],
],
),
),
),
),
const
Icon
(
Icons
.
arrow_circle_right_sharp
,
const
Icon
(
color:
Color
(
0xFFFFFFFF
),
size:
30
),
Icons
.
arrow_circle_right_sharp
,
color:
Color
(
0xFFFFFFFF
),
size:
30
,
),
],
],
),
),
)
),
),
),
),
// Add bottom padding
),
// Add bottom padding
],
],
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
@@ -511,9 +684,7 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -511,9 +684,7 @@ class _HomeScreenState extends State<HomeScreen> {
if
(
orders
.
isEmpty
)
{
if
(
orders
.
isEmpty
)
{
return
const
Padding
(
return
const
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
20
,
horizontal:
14
),
padding:
EdgeInsets
.
symmetric
(
vertical:
20
,
horizontal:
14
),
child:
Center
(
child:
Center
(
child:
Text
(
"No Orders Found"
)),
child:
Text
(
"No Orders Found"
),
),
);
);
}
}
...
@@ -532,34 +703,38 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -532,34 +703,38 @@ class _HomeScreenState extends State<HomeScreen> {
await
Navigator
.
push
(
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
Generatordetailsscreen
(
builder:
accId:
widget
.
accId
,
(
context
)
=>
Generatordetailsscreen
(
sessionId:
widget
.
sessionId
,
accId:
widget
.
accId
,
genId:
order
.
id
,
sessionId:
widget
.
sessionId
,
),
genId:
order
.
id
,
),
),
),
);
);
},
},
child:
_buildOrderItem
(
child:
_buildOrderItem
(
assetId:
"#
${order.hashId ?? ''}
| Engine :
${order.engine ?? ''}
"
,
assetId:
"#
${order.hashId ?? ''}
| Engine :
${order.engine ?? ''}
"
,
description:
order
.
prodName
??
''
,
description:
order
.
prodName
??
''
,
amc:
(
order
.
amc
?.
toString
()
??
''
),
amc:
(
order
.
amc
?.
toString
()
??
''
),
warranty:
(
order
.
warranty
?.
toString
()
??
''
),
warranty:
(
order
.
warranty
?.
toString
()
??
''
),
pImage:
order
.
productImage
??
''
,
pImage:
order
.
productImage
??
''
,
date:
order
.
schedule
?.
isNotEmpty
==
true
date:
?
order
.
schedule
!.
first
order
.
schedule
?.
isNotEmpty
==
true
:
null
,
?
order
.
schedule
!.
first
serviceText:
order
.
schedule
?.
isNotEmpty
==
true
:
null
,
?
'Upcoming Service Scheduled'
serviceText:
:
null
,
order
.
schedule
?.
isNotEmpty
==
true
?
'Upcoming Service Scheduled'
:
null
,
),
),
),
),
const
SizedBox
(
height:
12
),
const
SizedBox
(
height:
12
),
],
],
);
);
}).
toList
(),
}).
toList
(),
// See All Button
// See All Button
],
],
),
),
),
),
...
@@ -617,11 +792,15 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -617,11 +792,15 @@ class _HomeScreenState extends State<HomeScreen> {
// Status Badge with checkmark for AMC Protected
// Status Badge with checkmark for AMC Protected
if
(
amc
==
"1"
||
amc
==
"2"
)
if
(
amc
==
"1"
||
amc
==
"2"
)
Container
(
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8
,
vertical:
4
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8
,
vertical:
4
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
gradient:
amc
==
"1"
gradient:
?
AppColors
.
greenStripGradient
amc
==
"1"
:
AppColors
.
fadeGradient
,
?
AppColors
.
greenStripGradient
:
AppColors
.
fadeGradient
,
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
),
child:
Row
(
child:
Row
(
...
@@ -632,9 +811,10 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -632,9 +811,10 @@ class _HomeScreenState extends State<HomeScreen> {
SvgPicture
.
asset
(
SvgPicture
.
asset
(
"assets/svg/tick_ic.svg"
,
"assets/svg/tick_ic.svg"
,
height:
14
,
height:
14
,
color:
amc
==
"1"
color:
?
AppColors
.
greenICBg
amc
==
"1"
:
AppColors
.
subtitleText
,
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
),
const
SizedBox
(
width:
4
),
const
SizedBox
(
width:
4
),
Text
(
Text
(
...
@@ -644,9 +824,10 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -644,9 +824,10 @@ class _HomeScreenState extends State<HomeScreen> {
fontFamily:
"PoppinsBold"
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
fontWeight:
FontWeight
.
w700
,
color:
amc
==
"1"
color:
?
AppColors
.
greenICBg
amc
==
"1"
:
AppColors
.
subtitleText
,
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
),
),
),
Text
(
Text
(
...
@@ -656,29 +837,37 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -656,29 +837,37 @@ class _HomeScreenState extends State<HomeScreen> {
fontFamily:
"PoppinsBold"
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
fontWeight:
FontWeight
.
w700
,
color:
amc
==
"1"
color:
?
AppColors
.
normalText
amc
==
"1"
:
AppColors
.
subtitleText
,
?
AppColors
.
normalText
:
AppColors
.
subtitleText
,
),
),
),
),
SizedBox
(
width:
4
,
),
SizedBox
(
width:
4
),
if
(
amc
==
"2"
)
if
(
amc
==
"2"
)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
12
,)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
12
,
),
],
],
),
),
],
],
),
),
),
),
if
(
amc
==
"1"
||
amc
==
"2"
)
if
(
amc
==
"1"
||
amc
==
"2"
)
SizedBox
(
width:
16
),
SizedBox
(
width:
16
,),
// for warranty
// for warranty
if
(
warranty
==
"1"
||
warranty
==
"2"
)
if
(
warranty
==
"1"
||
warranty
==
"2"
)
Container
(
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8
,
vertical:
4
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8
,
vertical:
4
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
gradient:
warranty
==
"1"
gradient:
?
AppColors
.
yellowStripGradient
warranty
==
"1"
:
AppColors
.
fadeGradient
,
?
AppColors
.
yellowStripGradient
:
AppColors
.
fadeGradient
,
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
),
child:
Row
(
child:
Row
(
...
@@ -700,22 +889,26 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -700,22 +889,26 @@ class _HomeScreenState extends State<HomeScreen> {
fontFamily:
"PoppinsBold"
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
fontWeight:
FontWeight
.
w700
,
color:
warranty
==
"1"
color:
?
AppColors
.
normalText
warranty
==
"1"
:
AppColors
.
subtitleText
,
?
AppColors
.
normalText
:
AppColors
.
subtitleText
,
),
),
),
),
SizedBox
(
width:
6
,
),
SizedBox
(
width:
6
),
if
(
warranty
==
"2"
)
if
(
warranty
==
"2"
)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
12
,)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
12
,
),
],
],
),
),
],
],
),
),
),
),
],
],
)
),
],
],
),
),
),
),
...
@@ -727,14 +920,18 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -727,14 +920,18 @@ class _HomeScreenState extends State<HomeScreen> {
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
),
child:
Image
.
network
(
child:
Image
.
network
(
pImage
.
isNotEmpty
?
pImage
:
"https://erp.gengroup.in/assets/upload/inventory_add_genesis_product_pic/_1761047459_6425.png"
,
pImage
.
isNotEmpty
?
pImage
:
"https://erp.gengroup.in/assets/upload/inventory_add_genesis_product_pic/_1761047459_6425.png"
,
height:
50
,
height:
50
,
width:
50
,
width:
50
,
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
contain
,
errorBuilder:
(
context
,
error
,
stack
)
=>
errorBuilder:
Image
.
asset
(
'assets/images/dashboard_gen.png'
,
(
context
,
error
,
stack
)
=>
Image
.
asset
(
height:
40
,
'assets/images/dashboard_gen.png'
,
width:
40
),
height:
40
,
width:
40
,
),
),
),
),
),
],
],
...
@@ -808,7 +1005,14 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -808,7 +1005,14 @@ class _HomeScreenState extends State<HomeScreen> {
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
TransactionListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
))
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
TransactionListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
),
),
);
);
},
},
child:
const
Text
(
child:
const
Text
(
...
@@ -827,7 +1031,10 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -827,7 +1031,10 @@ class _HomeScreenState extends State<HomeScreen> {
width:
double
.
infinity
,
width:
double
.
infinity
,
padding:
EdgeInsets
.
all
(
22
),
padding:
EdgeInsets
.
all
(
22
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
gradient:
dashboardData
.
balanceType
==
'Pending Balance'
?
AppColors
.
balanceCardGradientP
:
AppColors
.
balanceCardGradientA
,
gradient:
dashboardData
.
balanceType
==
'Pending Balance'
?
AppColors
.
balanceCardGradientP
:
AppColors
.
balanceCardGradientA
,
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Row
(
child:
Row
(
...
@@ -863,8 +1070,11 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -863,8 +1070,11 @@ class _HomeScreenState extends State<HomeScreen> {
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
Row
(
Row
(
children:
[
children:
[
const
Icon
(
Icons
.
info_outline
,
const
Icon
(
color:
Colors
.
white
,
size:
16
),
Icons
.
info_outline
,
color:
Colors
.
white
,
size:
16
,
),
const
SizedBox
(
width:
6
),
const
SizedBox
(
width:
6
),
Text
(
Text
(
dashboardData
.
balanceType
??
''
,
dashboardData
.
balanceType
??
''
,
...
@@ -895,26 +1105,32 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -895,26 +1105,32 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
const
SizedBox
(
height:
10
),
const
SizedBox
(
height:
10
),
if
(
dashboardData
.
balanceType
==
'Pending Balance'
)
if
(
dashboardData
.
balanceType
==
'Pending Balance'
)
InkResponse
(
InkResponse
(
onTap:
()=>
_openPaymentSheet
(
context
,
dashboardData
?.
balanceAmount
!),
onTap:
child:
Container
(
()
=>
_openPaymentSheet
(
padding:
context
,
const
EdgeInsets
.
symmetric
(
horizontal:
23
,
vertical:
7
),
dashboardData
?.
balanceAmount
!,
decoration:
BoxDecoration
(
),
color:
Colors
.
white
,
child:
Container
(
borderRadius:
BorderRadius
.
circular
(
20
),
padding:
const
EdgeInsets
.
symmetric
(
),
horizontal:
23
,
child:
const
Text
(
vertical:
7
,
" Pay Now "
,
),
style:
TextStyle
(
decoration:
BoxDecoration
(
color:
Colors
.
blue
,
color:
Colors
.
white
,
fontFamily:
"Poppins"
,
borderRadius:
BorderRadius
.
circular
(
20
),
fontSize:
14
,
),
fontWeight:
FontWeight
.
w500
,
child:
const
Text
(
" Pay Now "
,
style:
TextStyle
(
color:
Colors
.
blue
,
fontFamily:
"Poppins"
,
fontSize:
14
,
fontWeight:
FontWeight
.
w500
,
),
),
),
),
),
),
),
),
],
],
),
),
),
),
...
@@ -927,7 +1143,7 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -927,7 +1143,7 @@ class _HomeScreenState extends State<HomeScreen> {
}
}
// COMPLAINTS SECTION
// COMPLAINTS SECTION
Widget
_buildComplaintsSection
(
dashboardData
)
{
Widget
_buildComplaintsSection
(
DashboardResponse
dashboardData
)
{
final
complaints
=
dashboardData
.
complaints
??
[];
final
complaints
=
dashboardData
.
complaints
??
[];
if
(
complaints
.
isEmpty
)
{
if
(
complaints
.
isEmpty
)
{
...
@@ -962,7 +1178,14 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -962,7 +1178,14 @@ class _HomeScreenState extends State<HomeScreen> {
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ComplaintListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
))
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ComplaintListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
),
),
);
);
},
},
child:
const
Text
(
child:
const
Text
(
...
@@ -978,118 +1201,138 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -978,118 +1201,138 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
...
complaints
.
map
<
Widget
>((
c
)
{
...
complaints
.
map
<
Widget
>((
c
)
{
return
Container
(
return
InkResponse
(
margin:
const
EdgeInsets
.
only
(
bottom:
10
),
onTap:
()
async
{
padding:
const
EdgeInsets
.
all
(
16
),
await
Navigator
.
push
(
decoration:
BoxDecoration
(
context
,
color:
Colors
.
white
,
MaterialPageRoute
(
borderRadius:
BorderRadius
.
circular
(
12
),
builder:
border:
Border
.
all
(
color:
Colors
.
grey
.
shade200
),
(
context
)
=>
ComplaintDetailsScreen
(
boxShadow:
[
accId:
widget
.
accId
,
BoxShadow
(
sessionId:
widget
.
sessionId
,
color:
Colors
.
black
.
withOpacity
(
0.03
),
complaintId:
c
.
id
,
blurRadius:
6
,
),
offset:
const
Offset
(
0
,
2
),
),
),
],
);
),
},
child:
Column
(
child:
Container
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
margin:
const
EdgeInsets
.
only
(
bottom:
10
),
children:
[
padding:
const
EdgeInsets
.
all
(
16
),
/// 🔹 Top row — Complaint name and status
decoration:
BoxDecoration
(
Row
(
color:
Colors
.
white
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
borderRadius:
BorderRadius
.
circular
(
12
),
children:
[
border:
Border
.
all
(
color:
Colors
.
grey
.
shade200
),
// Complaint info
boxShadow:
[
Expanded
(
BoxShadow
(
child:
Column
(
color:
Colors
.
black
.
withOpacity
(
0.03
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
blurRadius:
6
,
children:
[
offset:
const
Offset
(
0
,
2
),
Text
(
),
"#
${c.hashId ?? ''}
|
${c.complaintName ?? ''}
"
,
],
style:
const
TextStyle
(
),
fontSize:
14
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
/// 🔹 Top row — Complaint name and status
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
// Complaint info
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"#
${c.hashId ?? ''}
|
${c.complaintName ?? ''}
"
,
style:
const
TextStyle
(
fontSize:
14
,
color:
AppColors
.
amountText
,
color:
AppColors
.
amountText
,
),
),
),
),
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
Text
(
Text
(
c
.
registredDate
??
''
,
c
.
registredDate
??
''
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
12
,
font
Size:
12
,
font
Weight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
subtitleText
,
color:
AppColors
.
subtitleText
,
)
,
),
),
),
],
],
),
),
// Status badge
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
6
),
decoration:
BoxDecoration
(
color:
(
c
.
openStatus
?.
toLowerCase
()
==
'open'
)
?
AppColors
.
successBG
:
AppColors
.
warningBg2
,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
Text
(
c
.
openStatus
??
''
,
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
color:
(
c
.
openStatus
?.
toLowerCase
()
==
'open'
)
?
AppColors
.
success
:
AppColors
.
warningText
,
),
),
),
),
),
// Status badge
],
Container
(
),
padding:
const
EdgeInsets
.
symmetric
(
const
SizedBox
(
height:
12
),
horizontal:
16
,
const
Divider
(),
vertical:
6
,
/// 🔹 Product Info Row
),
Row
(
decoration:
BoxDecoration
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
color:
children:
[
(
c
.
openStatus
?.
toLowerCase
()
==
'open'
)
// Product details
?
AppColors
.
successBG
Expanded
(
:
AppColors
.
warningBg2
,
flex:
5
,
borderRadius:
BorderRadius
.
circular
(
10
),
child:
Text
(
),
c
.
productName
??
"Unknown Product"
,
child:
Text
(
style:
const
TextStyle
(
c
.
openStatus
??
''
,
fontSize:
12
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontSize:
14
,
color:
AppColors
.
normalText
,
fontWeight:
FontWeight
.
w400
,
color:
(
c
.
openStatus
?.
toLowerCase
()
==
'open'
)
?
AppColors
.
success
:
AppColors
.
warningText
,
),
),
),
),
),
),
],
// Product ID
),
Row
(
const
SizedBox
(
height:
12
),
children:
[
const
Divider
(),
Text
(
"#
${c.id ?? ''}
| "
,
/// 🔹 Product Info Row
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
// Product details
Expanded
(
flex:
5
,
child:
Text
(
c
.
productName
??
"Unknown Product"
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
12
,
fontSize:
12
,
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
subtitle
Text
,
color:
AppColors
.
normal
Text
,
),
),
),
),
if
((
c
.
modelName
??
''
).
isNotEmpty
)
),
// Product ID
Row
(
children:
[
Text
(
Text
(
"
Engine:
${c.modelName}
"
,
"
#
${c.id ?? ''}
|
"
,
style:
TextStyle
(
style:
const
TextStyle
(
fontSize:
12
,
fontSize:
12
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
subtitleText
,
color:
AppColors
.
subtitleText
,
),
),
),
),
],
if
((
c
.
modelName
??
''
).
isNotEmpty
)
),
Text
(
],
"Engine:
${c.modelName}
"
,
),
style:
TextStyle
(
],
fontSize:
12
,
color:
AppColors
.
subtitleText
,
),
),
],
),
],
),
],
),
),
),
);
);
}).
toList
(),
}).
toList
(),
...
@@ -1098,7 +1341,6 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -1098,7 +1341,6 @@ class _HomeScreenState extends State<HomeScreen> {
);
);
}
}
void
_openPaymentSheet
(
BuildContext
context
,
String
totalAmountStr
)
{
void
_openPaymentSheet
(
BuildContext
context
,
String
totalAmountStr
)
{
TextEditingController
amountController
=
TextEditingController
();
TextEditingController
amountController
=
TextEditingController
();
bool
isPartPayment
=
false
;
bool
isPartPayment
=
false
;
...
@@ -1271,9 +1513,10 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -1271,9 +1513,10 @@ class _HomeScreenState extends State<HomeScreen> {
width:
double
.
infinity
,
width:
double
.
infinity
,
child:
ElevatedButton
(
child:
ElevatedButton
(
onPressed:
()
{
onPressed:
()
{
double
enteredAmount
=
isPartPayment
double
enteredAmount
=
?
double
.
tryParse
(
amountController
.
text
)
??
0
isPartPayment
:
totalAmount
;
?
double
.
tryParse
(
amountController
.
text
)
??
0
:
totalAmount
;
if
(
enteredAmount
<=
0
)
{
if
(
enteredAmount
<=
0
)
{
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
...
@@ -1341,5 +1584,4 @@ class _HomeScreenState extends State<HomeScreen> {
...
@@ -1341,5 +1584,4 @@ class _HomeScreenState extends State<HomeScreen> {
},
},
);
);
}
}
}
}
\ No newline at end of file
lib/Screens/ProfileScreen.dart
View file @
97403192
...
@@ -316,9 +316,111 @@ class _ProfileScreenState extends State<ProfileScreen> {
...
@@ -316,9 +316,111 @@ class _ProfileScreenState extends State<ProfileScreen> {
return
Scaffold
(
return
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
body:
Center
(
child:
Text
(
child:
Padding
(
error
,
padding:
const
EdgeInsets
.
all
(
24.0
),
style:
const
TextStyle
(
color:
Colors
.
red
,
fontSize:
16
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Error Icon
Container
(
width:
120
,
height:
120
,
decoration:
BoxDecoration
(
color:
Colors
.
red
.
withOpacity
(
0.1
),
shape:
BoxShape
.
circle
,
),
child:
const
Icon
(
Icons
.
error_outline_rounded
,
size:
60
,
color:
Colors
.
red
,
),
),
const
SizedBox
(
height:
24
),
// Error Title
const
Text
(
"Oops! Something went wrong"
,
style:
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
fontFamily:
"Poppins"
,
),
),
const
SizedBox
(
height:
12
),
// Error Message
Text
(
error
,
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
height:
1.4
,
),
),
const
SizedBox
(
height:
32
),
// Retry Button
ElevatedButton
.
icon
(
onPressed:
()
async
{
// Show loading state
setState
(()
{});
await
Future
.
delayed
(
const
Duration
(
milliseconds:
300
));
// Retry fetching data
final
dashboardProvider
=
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
Provider
.
of
<
DashboardProvider
>(
context
,
listen:
false
);
profileProvider
.
fetchDashboard
(
widget
.
accId
,
widget
.
sessionId
);
},
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
AppColors
.
buttonColor
,
foregroundColor:
Colors
.
white
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
24
,
vertical:
12
,
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
25
),
),
elevation:
2
,
),
icon:
const
Icon
(
Icons
.
refresh_rounded
,
size:
20
),
label:
const
Text
(
"Try Again"
,
style:
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w500
,
fontFamily:
"Poppins"
,
),
),
),
const
SizedBox
(
height:
16
),
// Alternative Action
TextButton
(
onPressed:
()
{
// Go back or navigate to home
Navigator
.
maybePop
(
context
);
},
child:
const
Text
(
"Go Back"
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
),
),
),
],
),
),
),
),
),
);
);
...
...
lib/Screens/SplashScreen.dart
View file @
97403192
...
@@ -372,8 +372,8 @@ class _SplashScreenState extends State<SplashScreen> with SingleTickerProviderSt
...
@@ -372,8 +372,8 @@ class _SplashScreenState extends State<SplashScreen> with SingleTickerProviderSt
height:
170
,
height:
170
,
width:
170
,
width:
170
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/gen
esis_logo_2i
o.svg"
,
"assets/svg/gen
_log
o.svg"
,
color:
Color
(
0xFF
4076
FF
),
color:
Color
(
0xFF
FFFF
FF
),
),
),
),
),
),
),
...
...
lib/Screens/TransactionScreens/BillDetailScreen.dart
View file @
97403192
...
@@ -271,8 +271,8 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -271,8 +271,8 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
padding:
const
EdgeInsets
.
symmetric
(
vertical:
2
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
2
),
child:
_buildProductItem
(
child:
_buildProductItem
(
product
.
partName
.
toString
(),
product
.
partName
.
toString
(),
product
.
price
.
toString
(),
product
.
qty
.
toString
(),
product
.
qty
.
toString
(),
product
.
price
.
toString
(),
product
.
totalPrice
.
toString
()
product
.
totalPrice
.
toString
()
)
)
),
),
...
...
lib/Screens/TransactionScreens/contactMap.dart
0 → 100644
View file @
97403192
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:google_maps_flutter/google_maps_flutter.dart'
;
import
'package:provider/provider.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'../../Notifiers/mapProvider.dart'
;
import
'../../Utility/AppColors.dart'
;
class
ContactMap
extends
StatefulWidget
{
final
accId
;
final
sessionId
;
const
ContactMap
({
super
.
key
,
this
.
accId
,
this
.
sessionId
});
@override
State
<
ContactMap
>
createState
()
=>
_ContactMapState
();
}
class
_ContactMapState
extends
State
<
ContactMap
>
{
@override
void
initState
()
{
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
MapProvider
>(
context
,
listen:
false
,
);
provider
.
getLocationPermission
(
context
,
widget
.
accId
,
widget
.
sessionId
);
provider
.
nearbyServiceLocations
(
context
,
widget
.
accId
,
widget
.
sessionId
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
MapProvider
>(
builder:
(
context
,
provider
,
child
)
{
final
isLoading
=
provider
.
isLoading
;
final
data
=
provider
.
response
?.
getInTouchList
;
if
(
isLoading
)
{
return
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
child:
CircularProgressIndicator
(
color:
AppColors
.
buttonColor
),
),
);
}
if
(
data
==
null
||
data
.
isEmpty
)
{
return
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
child:
Text
(
"No data found."
),
),
);
}
return
SafeArea
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
CustomScrollView
(
slivers:
[
SliverAppBar
(
leading:
Container
(),
stretch:
true
,
backgroundColor:
AppColors
.
backgroundRegular
,
onStretchTrigger:
()
async
{
final
provider
=
Provider
.
of
<
MapProvider
>(
context
,
listen:
false
);
provider
.
nearbyServiceLocations
(
context
,
widget
.
accId
,
widget
.
sessionId
);
},
stretchTriggerOffset:
300.0
,
expandedHeight:
MediaQuery
.
of
(
context
).
size
.
height
*
0.5
,
flexibleSpace:
FlexibleSpaceBar
(
stretchModes:
const
[
StretchMode
.
zoomBackground
,
StretchMode
.
blurBackground
,
],
background:
Container
(
width:
double
.
infinity
,
decoration:
const
BoxDecoration
(
gradient:
AppColors
.
successGradient
),
child:
Column
(
children:
[
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.5
,
child:
Stack
(
children:
[
GoogleMap
(
myLocationEnabled:
true
,
zoomGesturesEnabled:
true
,
zoomControlsEnabled:
true
,
gestureRecognizers:
{
Factory
<
OneSequenceGestureRecognizer
>(
()
=>
EagerGestureRecognizer
(),
),
Factory
<
PanGestureRecognizer
>(
()
=>
PanGestureRecognizer
(),
),
Factory
<
ScaleGestureRecognizer
>(
()
=>
ScaleGestureRecognizer
(),
),
},
initialCameraPosition:
CameraPosition
(
target:
provider
.
startLocation
,
zoom:
14.0
,
),
markers:
provider
.
markers
.
toSet
(),
mapType:
MapType
.
normal
,
onMapCreated:
(
controller
)
{
provider
.
mapController
=
controller
;
},
onCameraMove:
(
position
)
{
provider
.
onCameraMove
(
context
,
position
,
widget
.
accId
,
widget
.
sessionId
);
},
onTap:
(
position
)
{
provider
.
mapController
?.
hideMarkerInfoWindow
(
provider
.
markers
.
isNotEmpty
?
provider
.
markers
.
first
.
markerId
:
MarkerId
(
''
),
);
},
),
Container
(
height:
75
,
decoration:
BoxDecoration
(
gradient:
LinearGradient
(
colors:
[
Color
(
0xFFFFFFFF
),
Color
(
0xFFFFFFFF
),
Color
(
0xFFFFFFFF
).
withAlpha
(
0
),
],
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
)
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
20
,
),
child:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back.svg"
,
height:
25
,
color:
AppColors
.
nearDarkText
,
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
InkResponse
(
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
Text
(
"Contact Us"
,
overflow:
TextOverflow
.
ellipsis
,
maxLines:
1
,
style:
TextStyle
(
fontSize:
16
,
color:
AppColors
.
nearDarkText
,
height:
1.1
,
),
),
),
),
],
),
),
),
],
),
),
],
),
),
),
),
SliverToBoxAdapter
(
child:
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
backgroundRegular
,
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
30
),
topRight:
Radius
.
circular
(
30
),
),
boxShadow:
[
BoxShadow
(
color:
Colors
.
black
.
withOpacity
(
0.1
),
blurRadius:
10
,
offset:
Offset
(
0
,
-
5
),
),
],
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
30
),
topRight:
Radius
.
circular
(
30
),
),
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
0
),
decoration:
const
BoxDecoration
(
color:
AppColors
.
backgroundRegular
,
),
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
const
SizedBox
(
height:
20
),
/// Build dynamic branch list
for
(
var
item
in
data
)
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
8.0
),
child:
_buildItemRow
(
branchName:
item
.
branchName
??
"Unknown Branch"
,
address:
item
.
address
??
"No address available"
,
phoneNo:
item
.
telephoneNo
??
""
,
lat:
item
.
latitude
??
""
,
long:
item
.
longitude
??
""
,
),
),
const
SizedBox
(
height:
30
),
],
),
),
),
),
),
)
],
)
),
);
},
);
}
Widget
_buildItemRow
({
required
String
branchName
,
required
String
address
,
required
String
phoneNo
,
required
String
lat
,
required
String
long
,
})
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
14
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
22
)),
child:
Row
(
children:
[
const
SizedBox
(
width:
14
),
Expanded
(
flex:
6
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
branchName
,
style:
const
TextStyle
(
color:
AppColors
.
normalText
,
fontWeight:
FontWeight
.
w600
,
fontSize:
14
,
overflow:
TextOverflow
.
ellipsis
,
),
),
const
SizedBox
(
height:
4
),
Text
(
address
,
maxLines:
4
,
style:
const
TextStyle
(
color:
AppColors
.
subtitleText
,
fontWeight:
FontWeight
.
w400
,
fontSize:
14
,
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
),
const
SizedBox
(
width:
8
),
Row
(
children:
[
InkResponse
(
onTap:
()
{
// map lat & long
},
child:
Container
(
padding:
const
EdgeInsets
.
all
(
1
),
decoration:
BoxDecoration
(
color:
Colors
.
transparent
,
borderRadius:
BorderRadius
.
circular
(
30
)),
child:
SvgPicture
.
asset
(
"assets/svg/route_ic.svg"
,
height:
42
,
fit:
BoxFit
.
contain
,
),
),
),
const
SizedBox
(
width:
6
),
InkResponse
(
onTap:
()
async
{
final
phone
=
phoneNo
.
trim
();
if
(
phone
.
isEmpty
)
{
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
SnackBar
(
backgroundColor:
Colors
.
redAccent
,
content:
const
Text
(
"Phone number not available"
,
style:
TextStyle
(
color:
Colors
.
white
),
),
duration:
Duration
(
seconds:
2
),
behavior:
SnackBarBehavior
.
floating
,
),
);
return
;
}
final
Uri
phoneUri
=
Uri
(
scheme:
'tel'
,
path:
phone
);
try
{
if
(
await
canLaunchUrl
(
phoneUri
))
{
await
launchUrl
(
phoneUri
);
}
else
{
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
SnackBar
(
backgroundColor:
Colors
.
redAccent
,
content:
const
Text
(
"Unable to start the call"
,
style:
TextStyle
(
color:
Colors
.
white
),
),
duration:
Duration
(
seconds:
2
),
behavior:
SnackBarBehavior
.
floating
,
),
);
}
}
catch
(
e
)
{
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
SnackBar
(
backgroundColor:
Colors
.
redAccent
,
content:
Text
(
"Error while trying to call:
$e
"
,
style:
const
TextStyle
(
color:
Colors
.
white
),
),
duration:
const
Duration
(
seconds:
2
),
behavior:
SnackBarBehavior
.
floating
,
),
);
}
},
child:
Container
(
padding:
const
EdgeInsets
.
all
(
14
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xFF4CAF50
),
borderRadius:
BorderRadius
.
circular
(
30
),
),
child:
SvgPicture
.
asset
(
"assets/svg/phone_ic.svg"
,
height:
16
,
color:
Colors
.
white
,
fit:
BoxFit
.
contain
,
),
),
),
],
),
],
),
);
}
}
lib/Screens/generatorDetailsScreen.dart
View file @
97403192
...
@@ -58,12 +58,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
...
@@ -58,12 +58,12 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
final
isLoading
=
detailsProvider
.
isLoading
;
final
isLoading
=
detailsProvider
.
isLoading
;
final
error
=
detailsProvider
.
errorMessage
;
final
error
=
detailsProvider
.
errorMessage
;
final
data
=
detailsProvider
.
detailsResponse
;
final
data
=
detailsProvider
.
detailsResponse
;
final
genDetails
=
data
!
.
genDetails
??
GenDetails
();
final
genDetails
=
data
?
.
genDetails
??
GenDetails
();
final
locDetails
=
data
.
locationDetails
??
LocationDetails
();
final
locDetails
=
data
?
.
locationDetails
??
LocationDetails
();
final
quotationsList
=
data
.
quotations
??[];
final
quotationsList
=
data
?
.
quotations
??[];
final
scheduleList
=
data
.
schedule
??
[];
final
scheduleList
=
data
?
.
schedule
??
[];
final
amcQuotationsList
=
data
.
amcQuotations
??[];
final
amcQuotationsList
=
data
?
.
amcQuotations
??[];
final
complaintList
=
data
.
complaints
??[];
final
complaintList
=
data
?
.
complaints
??[];
List
<
String
>
sectionTitles
=
[
"Generator Details"
,
"Location Details"
];
List
<
String
>
sectionTitles
=
[
"Generator Details"
,
"Location Details"
];
List
<
String
>
headings1
=
[
List
<
String
>
headings1
=
[
...
@@ -75,19 +75,19 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
...
@@ -75,19 +75,19 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
"Dispatch Date"
,
"Dispatch Date"
,
];
];
List
<
String
>
subHeadings1
=
[
List
<
String
>
subHeadings1
=
[
genDetails
!
.
purchaseDate
??
"-"
,
genDetails
?
.
purchaseDate
??
"-"
,
genDetails
!
.
altNo
??
"-"
,
genDetails
?
.
altNo
??
"-"
,
genDetails
!
.
modelName
??
"-"
,
genDetails
?
.
modelName
??
"-"
,
genDetails
!
.
batterNo
??
"-"
,
genDetails
?
.
batterNo
??
"-"
,
genDetails
!
.
commisDate
??
"-"
,
genDetails
?
.
commisDate
??
"-"
,
genDetails
!
.
dispDate
??
"-"
,
genDetails
?
.
dispDate
??
"-"
,
];
];
List
<
String
>
headings2
=
[
"District"
,
"State"
,
"Address"
];
List
<
String
>
headings2
=
[
"District"
,
"State"
,
"Address"
];
List
<
String
>
subHeadings2
=
[
List
<
String
>
subHeadings2
=
[
locDetails
!
.
districtName
??
"-"
,
locDetails
?
.
districtName
??
"-"
,
locDetails
!
.
stateName
??
"-"
,
locDetails
?
.
stateName
??
"-"
,
locDetails
!
.
address
??
"-"
,
locDetails
?
.
address
??
"-"
,
];
];
List
<
List
<
String
>>
headings
=
[
headings1
,
headings2
];
List
<
List
<
String
>>
headings
=
[
headings1
,
headings2
];
List
<
List
<
String
>>
subHeadings
=
[
subHeadings1
,
subHeadings2
];
List
<
List
<
String
>>
subHeadings
=
[
subHeadings1
,
subHeadings2
];
...
@@ -105,9 +105,116 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
...
@@ -105,9 +105,116 @@ class _GeneratordetailsscreenState extends State<Generatordetailsscreen> {
return
Scaffold
(
return
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
body:
Center
(
child:
Text
(
child:
Padding
(
error
,
padding:
const
EdgeInsets
.
all
(
24.0
),
style:
const
TextStyle
(
color:
Colors
.
red
,
fontSize:
16
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Error Icon
Container
(
width:
120
,
height:
120
,
decoration:
BoxDecoration
(
color:
Colors
.
red
.
withOpacity
(
0.1
),
shape:
BoxShape
.
circle
,
),
child:
const
Icon
(
Icons
.
error_outline_rounded
,
size:
60
,
color:
Colors
.
red
,
),
),
const
SizedBox
(
height:
24
),
// Error Title
const
Text
(
"Oops! Something went wrong"
,
style:
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
fontFamily:
"Poppins"
,
),
),
const
SizedBox
(
height:
12
),
// Error Message
Text
(
error
,
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
height:
1.4
,
),
),
const
SizedBox
(
height:
32
),
// Retry Button
ElevatedButton
.
icon
(
onPressed:
()
async
{
// Show loading state
setState
(()
{});
await
Future
.
delayed
(
const
Duration
(
milliseconds:
300
));
// Retry fetching data
final
detailsProvider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
detailsProvider
.
fetchGeneratorDetails
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genId
,
);
},
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
AppColors
.
buttonColor
,
foregroundColor:
Colors
.
white
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
24
,
vertical:
12
,
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
25
),
),
elevation:
2
,
),
icon:
const
Icon
(
Icons
.
refresh_rounded
,
size:
20
),
label:
const
Text
(
"Try Again"
,
style:
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w500
,
fontFamily:
"Poppins"
,
),
),
),
const
SizedBox
(
height:
16
),
// Alternative Action
TextButton
(
onPressed:
()
{
// Go back or navigate to home
Navigator
.
pop
(
context
);
},
child:
const
Text
(
"Go Back"
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
),
),
),
],
),
),
),
),
),
);
);
...
...
lib/Screens/quotationListScreen.dart
View file @
97403192
...
@@ -59,14 +59,116 @@ class _QuotationListScreenState extends State<QuotationListScreen> {
...
@@ -59,14 +59,116 @@ class _QuotationListScreenState extends State<QuotationListScreen> {
return
Scaffold
(
return
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
body:
Center
(
child:
Text
(
child:
Padding
(
error
,
padding:
const
EdgeInsets
.
all
(
24.0
),
style:
const
TextStyle
(
color:
Colors
.
red
,
fontSize:
16
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Error Icon
Container
(
width:
120
,
height:
120
,
decoration:
BoxDecoration
(
color:
Colors
.
red
.
withOpacity
(
0.1
),
shape:
BoxShape
.
circle
,
),
child:
const
Icon
(
Icons
.
error_outline_rounded
,
size:
60
,
color:
Colors
.
red
,
),
),
const
SizedBox
(
height:
24
),
// Error Title
const
Text
(
"Oops! Something went wrong"
,
style:
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
fontFamily:
"Poppins"
,
),
),
const
SizedBox
(
height:
12
),
// Error Message
Text
(
error
,
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
height:
1.4
,
),
),
const
SizedBox
(
height:
32
),
// Retry Button
ElevatedButton
.
icon
(
onPressed:
()
async
{
// Show loading state
setState
(()
{});
await
Future
.
delayed
(
const
Duration
(
milliseconds:
300
));
// Retry fetching data
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
await
provider
.
fetchQuotationList
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genId
);
},
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
AppColors
.
buttonColor
,
foregroundColor:
Colors
.
white
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
24
,
vertical:
12
,
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
25
),
),
elevation:
2
,
),
icon:
const
Icon
(
Icons
.
refresh_rounded
,
size:
20
),
label:
const
Text
(
"Try Again"
,
style:
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w500
,
fontFamily:
"Poppins"
,
),
),
),
const
SizedBox
(
height:
16
),
// Alternative Action
TextButton
(
onPressed:
()
{
// Go back or navigate to home
Navigator
.
maybePop
(
context
);
},
child:
const
Text
(
"Go Back"
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
),
),
),
],
),
),
),
),
),
);
);
}
}
if
(
data
==
null
)
{
if
(
data
==
null
)
{
return
const
Scaffold
(
return
const
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
...
...
lib/Screens/scheduleListScreen.dart
View file @
97403192
...
@@ -59,9 +59,112 @@ class _ScheduleListScreenState extends State<ScheduleListScreen> {
...
@@ -59,9 +59,112 @@ class _ScheduleListScreenState extends State<ScheduleListScreen> {
return
Scaffold
(
return
Scaffold
(
backgroundColor:
AppColors
.
backgroundRegular
,
backgroundColor:
AppColors
.
backgroundRegular
,
body:
Center
(
body:
Center
(
child:
Text
(
child:
Padding
(
error
,
padding:
const
EdgeInsets
.
all
(
24.0
),
style:
const
TextStyle
(
color:
Colors
.
red
,
fontSize:
16
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Error Icon
Container
(
width:
120
,
height:
120
,
decoration:
BoxDecoration
(
color:
Colors
.
red
.
withOpacity
(
0.1
),
shape:
BoxShape
.
circle
,
),
child:
const
Icon
(
Icons
.
error_outline_rounded
,
size:
60
,
color:
Colors
.
red
,
),
),
const
SizedBox
(
height:
24
),
// Error Title
const
Text
(
"Oops! Something went wrong"
,
style:
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
fontFamily:
"Poppins"
,
),
),
const
SizedBox
(
height:
12
),
// Error Message
Text
(
error
,
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
height:
1.4
,
),
),
const
SizedBox
(
height:
32
),
// Retry Button
ElevatedButton
.
icon
(
onPressed:
()
async
{
// Show loading state
setState
(()
{});
await
Future
.
delayed
(
const
Duration
(
milliseconds:
300
));
// Retry fetching data
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
await
provider
.
fetchScheduleList
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genId
);
},
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
AppColors
.
buttonColor
,
foregroundColor:
Colors
.
white
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
24
,
vertical:
12
,
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
25
),
),
elevation:
2
,
),
icon:
const
Icon
(
Icons
.
refresh_rounded
,
size:
20
),
label:
const
Text
(
"Try Again"
,
style:
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w500
,
fontFamily:
"Poppins"
,
),
),
),
const
SizedBox
(
height:
16
),
// Alternative Action
TextButton
(
onPressed:
()
{
// Go back or navigate to home
Navigator
.
maybePop
(
context
);
},
child:
const
Text
(
"Go Back"
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
,
fontFamily:
"Poppins"
,
),
),
),
],
),
),
),
),
),
);
);
...
...
lib/Services/api_URLs.dart
View file @
97403192
...
@@ -31,4 +31,9 @@ const getPaymentStatusUrl = "${baseUrl}get_payment_status";
...
@@ -31,4 +31,9 @@ const getPaymentStatusUrl = "${baseUrl}get_payment_status";
const
addComplaintUrl
=
"
${baseUrl}
add_complaint"
;
const
addComplaintUrl
=
"
${baseUrl}
add_complaint"
;
const
generatorListUrl
=
"
${baseUrl}
generator_list"
;
const
generatorListUrl
=
"
${baseUrl}
generator_list"
;
const
complaintDropdownsUrl
=
"
${baseUrl}
complaint_dropdowns"
;
const
complaintDropdownsUrl
=
"
${baseUrl}
complaint_dropdowns"
;
const
getInTouchListUrl
=
"
${baseUrl}
get_in_touch_list"
;
const
getInTouchListUrl
=
"
${baseUrl}
get_in_touch_list"
;
\ No newline at end of file
const
complaintDetailsUrl
=
"
${baseUrl}
complaint_details"
;
const
allJobCardsListUrl
=
"
${baseUrl}
all_job_card_list"
;
const
allServiceListUrl
=
"
${baseUrl}
all_service_list"
;
const
jobCardProductsUrl
=
"
${baseUrl}
job_card_products"
;
const
updateTechRatingUrl
=
"
${baseUrl}
update_tech_rating"
;
\ No newline at end of file
lib/Services/api_calling.dart
View file @
97403192
...
@@ -3,6 +3,9 @@ import 'dart:io';
...
@@ -3,6 +3,9 @@ import 'dart:io';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:gen_service/Models/GetInTouchListResponse.dart'
;
import
'package:gen_service/Models/GetInTouchListResponse.dart'
;
import
'package:gen_service/Models/HelpAndComplaintModels/ComplaintListResponse.dart'
;
import
'package:gen_service/Models/HelpAndComplaintModels/ComplaintListResponse.dart'
;
import
'package:gen_service/Models/HelpAndComplaintModels/allJobCardListResponse.dart'
;
import
'package:gen_service/Models/HelpAndComplaintModels/allServiceListResponse.dart'
;
import
'package:gen_service/Models/HelpAndComplaintModels/jobCardProductsResponse.dart'
;
import
'package:gen_service/Models/ProfileDataResponse.dart'
;
import
'package:gen_service/Models/ProfileDataResponse.dart'
;
import
'package:gen_service/Models/TransactionModels/BillDetailResponse.dart'
;
import
'package:gen_service/Models/TransactionModels/BillDetailResponse.dart'
;
import
'package:gen_service/Models/TransactionModels/PaymentDetailResponse.dart'
;
import
'package:gen_service/Models/TransactionModels/PaymentDetailResponse.dart'
;
...
@@ -10,11 +13,13 @@ import 'package:gen_service/Models/amcQuotationListResponse.dart';
...
@@ -10,11 +13,13 @@ import 'package:gen_service/Models/amcQuotationListResponse.dart';
import
'package:gen_service/Models/complaintListResponse.dart'
;
import
'package:gen_service/Models/complaintListResponse.dart'
;
import
'package:gen_service/Models/generatorDetailsResponse.dart'
;
import
'package:gen_service/Models/generatorDetailsResponse.dart'
;
import
'package:gen_service/Models/quotationListResponse.dart'
;
import
'package:gen_service/Models/quotationListResponse.dart'
;
import
'package:gen_service/Models/ratingResponse.dart'
;
import
'package:gen_service/Models/scheduleListResponse.dart'
;
import
'package:gen_service/Models/scheduleListResponse.dart'
;
import
'../Models/AuthResponse.dart'
;
import
'../Models/AuthResponse.dart'
;
import
'../Models/CommonResponse.dart'
;
import
'../Models/CommonResponse.dart'
;
import
'../Models/DashboardResponse.dart'
;
import
'../Models/DashboardResponse.dart'
;
import
'../Models/HelpAndComplaintModels/GeneratorListResponse.dart'
;
import
'../Models/HelpAndComplaintModels/GeneratorListResponse.dart'
;
import
'../Models/HelpAndComplaintModels/complaintDetailsResponse.dart'
;
import
'../Models/TransactionModels/PayAmountResponse.dart'
;
import
'../Models/TransactionModels/PayAmountResponse.dart'
;
import
'../Models/TransactionModels/TransactionListResponse.dart'
;
import
'../Models/TransactionModels/TransactionListResponse.dart'
;
import
'../Models/HelpAndComplaintModels/DropDownsListResponse.dart'
;
import
'../Models/HelpAndComplaintModels/DropDownsListResponse.dart'
;
...
@@ -152,14 +157,14 @@ class ApiCalling {
...
@@ -152,14 +157,14 @@ class ApiCalling {
static
Future
<
TransactionListResponse
?>
fetchTransactionListApi
(
static
Future
<
TransactionListResponse
?>
fetchTransactionListApi
(
String
accId
,
String
accId
,
String
sessionId
,
String
sessionId
,
String
page
N
umber
,
page
_n
umber
)
async
{
)
async
{
debugPrint
(
"###############################Transaction Api calling "
);
debugPrint
(
"###############################Transaction Api calling "
);
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"session_id"
:
sessionId
,
"page_number"
:
page
N
umber
,
"page_number"
:
page
_n
umber
};
};
final
res
=
await
post
(
data
,
transactionsUrl
,
{});
final
res
=
await
post
(
data
,
transactionsUrl
,
{});
...
@@ -605,7 +610,6 @@ class ApiCalling {
...
@@ -605,7 +610,6 @@ class ApiCalling {
String
accId
,
String
accId
,
String
sessionId
,
String
sessionId
,
)
async
{
)
async
{
debugPrint
(
"############################### Api calling "
);
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"acc_id"
:
accId
,
...
@@ -630,7 +634,6 @@ class ApiCalling {
...
@@ -630,7 +634,6 @@ class ApiCalling {
String
sessionId
,
String
sessionId
,
genID
genID
)
async
{
)
async
{
debugPrint
(
"############################### Api calling "
);
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"acc_id"
:
accId
,
...
@@ -651,4 +654,140 @@ class ApiCalling {
...
@@ -651,4 +654,140 @@ class ApiCalling {
}
}
}
}
static
Future
<
complaintDetailsResponse
?>
complaintDetailsAPI
(
String
accId
,
String
sessionId
,
complaintId
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"complaint_id"
:
complaintId
,
};
print
(
data
);
final
res
=
await
post
(
data
,
complaintDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
res
.
body
);
return
complaintDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Complaint API Error:
$e
"
);
return
null
;
}
}
static
Future
<
allJobCardListResponse
?>
jobCardsListAPI
(
String
accId
,
String
sessionId
,
complaintId
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"complaint_id"
:
complaintId
,
};
print
(
data
);
final
res
=
await
post
(
data
,
allJobCardsListUrl
,
{});
if
(
res
!=
null
)
{
print
(
res
.
body
);
return
allJobCardListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Complaint API Error:
$e
"
);
return
null
;
}
}
static
Future
<
allServiceListResponse
?>
serviceListAPI
(
String
accId
,
String
sessionId
,
complaintId
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"complaint_id"
:
complaintId
,
};
print
(
data
);
final
res
=
await
post
(
data
,
allServiceListUrl
,
{});
if
(
res
!=
null
)
{
print
(
res
.
body
);
return
allServiceListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Complaint API Error:
$e
"
);
return
null
;
}
}
static
Future
<
jobCardProductsResponse
?>
jobCardProductDetailsAPI
(
String
accId
,
String
sessionId
,
jobCardId
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"job_card_id"
:
jobCardId
,
};
print
(
data
);
final
res
=
await
post
(
data
,
jobCardProductsUrl
,
{});
if
(
res
!=
null
)
{
print
(
res
.
body
);
return
jobCardProductsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Complaint API Error:
$e
"
);
return
null
;
}
}
static
Future
<
ratingResponse
?>
updateTechRatingAPI
(
String
accId
,
String
sessionId
,
complaintId
,
rating
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"complaint_id"
:
complaintId
,
"rating"
:
rating
.
toString
()
};
print
(
data
);
final
res
=
await
post
(
data
,
updateTechRatingUrl
,
{});
if
(
res
!=
null
)
{
print
(
res
.
body
);
return
ratingResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Complaint API Error:
$e
"
);
return
null
;
}
}
}
}
lib/main.dart
View file @
97403192
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:gen_service/Notifiers/AuthProvider.dart'
;
import
'package:gen_service/Notifiers/AuthProvider.dart'
;
import
'package:gen_service/Notifiers/TransactionsProvider.dart'
;
import
'package:gen_service/Notifiers/TransactionsProvider.dart'
;
import
'package:gen_service/Notifiers/mapProvider.dart'
;
import
'package:gen_service/Notifiers/serviceAndJobCardListProvier.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'Notifiers/ContactUsProvider.dart'
;
import
'Notifiers/ContactUsProvider.dart'
;
...
@@ -30,6 +32,9 @@ class MyApp extends StatelessWidget {
...
@@ -30,6 +32,9 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider
(
create:
(
_
)
=>
HelpAndComplaintProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
HelpAndComplaintProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Generatordetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Generatordetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
ContactUsProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
ContactUsProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
ServiceAndJobCardListProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
MapProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
PayAmountProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
PayAmountProvider
()),
],
],
child:
Consumer
<
ThemeProvider
>(
child:
Consumer
<
ThemeProvider
>(
...
...
macos/Flutter/GeneratedPluginRegistrant.swift
View file @
97403192
...
@@ -7,6 +7,9 @@ import Foundation
...
@@ -7,6 +7,9 @@ import Foundation
import
connectivity_plus
import
connectivity_plus
import
device_info_plus
import
device_info_plus
import
geolocator_apple
import
location
import
package_info_plus
import
path_provider_foundation
import
path_provider_foundation
import
shared_preferences_foundation
import
shared_preferences_foundation
import
url_launcher_macos
import
url_launcher_macos
...
@@ -14,6 +17,9 @@ import url_launcher_macos
...
@@ -14,6 +17,9 @@ import url_launcher_macos
func
RegisterGeneratedPlugins
(
registry
:
FlutterPluginRegistry
)
{
func
RegisterGeneratedPlugins
(
registry
:
FlutterPluginRegistry
)
{
ConnectivityPlusPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"ConnectivityPlusPlugin"
))
ConnectivityPlusPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"ConnectivityPlusPlugin"
))
DeviceInfoPlusMacosPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"DeviceInfoPlusMacosPlugin"
))
DeviceInfoPlusMacosPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"DeviceInfoPlusMacosPlugin"
))
GeolocatorPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"GeolocatorPlugin"
))
LocationPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"LocationPlugin"
))
FPPPackageInfoPlusPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"FPPPackageInfoPlusPlugin"
))
PathProviderPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"PathProviderPlugin"
))
PathProviderPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"PathProviderPlugin"
))
SharedPreferencesPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"SharedPreferencesPlugin"
))
SharedPreferencesPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"SharedPreferencesPlugin"
))
UrlLauncherPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"UrlLauncherPlugin"
))
UrlLauncherPlugin
.
register
(
with
:
registry
.
registrar
(
forPlugin
:
"UrlLauncherPlugin"
))
...
...
pubspec.lock
View file @
97403192
...
@@ -81,6 +81,14 @@ packages:
...
@@ -81,6 +81,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.7"
version: "3.0.7"
csslib:
dependency: transitive
description:
name: csslib
sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
cupertino_icons:
cupertino_icons:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -153,6 +161,14 @@ packages:
...
@@ -153,6 +161,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "7.0.1"
version: "7.0.1"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
@@ -166,6 +182,14 @@ packages:
...
@@ -166,6 +182,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "5.0.0"
version: "5.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: c2fe1001710127dfa7da89977a08d591398370d099aacdaa6d44da7eb14b8476
url: "https://pub.dev"
source: hosted
version: "2.0.31"
flutter_svg:
flutter_svg:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -192,6 +216,102 @@ packages:
...
@@ -192,6 +216,102 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "8.2.14"
version: "8.2.14"
geoclue:
dependency: transitive
description:
name: geoclue
sha256: c2a998c77474fc57aa00c6baa2928e58f4b267649057a1c76738656e9dbd2a7f
url: "https://pub.dev"
source: hosted
version: "0.1.1"
geocoding:
dependency: "direct main"
description:
name: geocoding
sha256: "606be036287842d779d7ec4e2f6c9435fc29bbbd3c6da6589710f981d8852895"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
geocoding_android:
dependency: transitive
description:
name: geocoding_android
sha256: ba810da90d6633cbb82bbab630e5b4a3b7d23503263c00ae7f1ef0316dcae5b9
url: "https://pub.dev"
source: hosted
version: "4.0.1"
geocoding_ios:
dependency: transitive
description:
name: geocoding_ios
sha256: "18ab1c8369e2b0dcb3a8ccc907319334f35ee8cf4cfef4d9c8e23b13c65cb825"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
geocoding_platform_interface:
dependency: transitive
description:
name: geocoding_platform_interface
sha256: "8c2c8226e5c276594c2e18bfe88b19110ed770aeb7c1ab50ede570be8b92229b"
url: "https://pub.dev"
source: hosted
version: "3.2.0"
geolocator:
dependency: "direct main"
description:
name: geolocator
sha256: "79939537046c9025be47ec645f35c8090ecadb6fe98eba146a0d25e8c1357516"
url: "https://pub.dev"
source: hosted
version: "14.0.2"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
sha256: "179c3cb66dfa674fc9ccbf2be872a02658724d1c067634e2c427cf6df7df901a"
url: "https://pub.dev"
source: hosted
version: "5.0.2"
geolocator_apple:
dependency: transitive
description:
name: geolocator_apple
sha256: dbdd8789d5aaf14cf69f74d4925ad1336b4433a6efdf2fce91e8955dc921bf22
url: "https://pub.dev"
source: hosted
version: "2.3.13"
geolocator_linux:
dependency: transitive
description:
name: geolocator_linux
sha256: c4e966f0a7a87e70049eac7a2617f9e16fd4c585a26e4330bdfc3a71e6a721f3
url: "https://pub.dev"
source: hosted
version: "0.2.3"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
sha256: "30cb64f0b9adcc0fb36f628b4ebf4f731a2961a0ebd849f4b56200205056fe67"
url: "https://pub.dev"
source: hosted
version: "4.2.6"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
sha256: b1ae9bdfd90f861fde8fd4f209c37b953d65e92823cb73c7dee1fa021b06f172
url: "https://pub.dev"
source: hosted
version: "4.1.3"
geolocator_windows:
dependency: transitive
description:
name: geolocator_windows
sha256: "175435404d20278ffd220de83c2ca293b73db95eafbdc8131fe8609be1421eb6"
url: "https://pub.dev"
source: hosted
version: "0.2.5"
google_fonts:
google_fonts:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -200,6 +320,70 @@ packages:
...
@@ -200,6 +320,70 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "6.3.2"
version: "6.3.2"
google_maps:
dependency: transitive
description:
name: google_maps
sha256: "5d410c32112d7c6eb7858d359275b2aa04778eed3e36c745aeae905fb2fa6468"
url: "https://pub.dev"
source: hosted
version: "8.2.0"
google_maps_flutter:
dependency: "direct main"
description:
name: google_maps_flutter
sha256: "819985697596a42e1054b5feb2f407ba1ac92262e02844a40168e742b9f36dca"
url: "https://pub.dev"
source: hosted
version: "2.14.0"
google_maps_flutter_android:
dependency: transitive
description:
name: google_maps_flutter_android
sha256: "7c7ff5b883b27bfdd0d52d91d89faf00858a6c1b33aeca0dc80faca64f389983"
url: "https://pub.dev"
source: hosted
version: "2.18.3"
google_maps_flutter_ios:
dependency: transitive
description:
name: google_maps_flutter_ios
sha256: ca02463b19a9abc7d31fcaf22631d021d647107467f741b917a69fa26659fd75
url: "https://pub.dev"
source: hosted
version: "2.15.5"
google_maps_flutter_platform_interface:
dependency: transitive
description:
name: google_maps_flutter_platform_interface
sha256: f4b9b44f7b12a1f6707ffc79d082738e0b7e194bf728ee61d2b3cdf5fdf16081
url: "https://pub.dev"
source: hosted
version: "2.14.0"
google_maps_flutter_web:
dependency: transitive
description:
name: google_maps_flutter_web
sha256: d416602944e1859f3cbbaa53e34785c223fa0a11eddb34a913c964c5cbb5d8cf
url: "https://pub.dev"
source: hosted
version: "0.5.14+3"
gsettings:
dependency: transitive
description:
name: gsettings
sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c"
url: "https://pub.dev"
source: hosted
version: "0.2.8"
html:
dependency: transitive
description:
name: html
sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602"
url: "https://pub.dev"
source: hosted
version: "0.15.6"
http:
http:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -248,6 +432,30 @@ packages:
...
@@ -248,6 +432,30 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "5.1.1"
version: "5.1.1"
location:
dependency: "direct main"
description:
name: location
sha256: b080053c181c7d152c43dd576eec6436c40e25f326933051c330da563ddd5333
url: "https://pub.dev"
source: hosted
version: "8.0.1"
location_platform_interface:
dependency: transitive
description:
name: location_platform_interface
sha256: ca8700bb3f6b1e8b2afbd86bd78b2280d116c613ca7bfa1d4d7b64eba357d749
url: "https://pub.dev"
source: hosted
version: "6.0.1"
location_web:
dependency: transitive
description:
name: location_web
sha256: b8e3add5efe0d65c5e692b7a135d80a4015c580d3ea646fa71973e97668dd868
url: "https://pub.dev"
source: hosted
version: "6.0.1"
matcher:
matcher:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -296,6 +504,22 @@ packages:
...
@@ -296,6 +504,22 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "4.7.0"
version: "4.7.0"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
url: "https://pub.dev"
source: hosted
version: "8.3.1"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -360,6 +584,54 @@ packages:
...
@@ -360,6 +584,54 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.3.0"
version: "2.3.0"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
url: "https://pub.dev"
source: hosted
version: "12.0.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
url: "https://pub.dev"
source: hosted
version: "13.0.1"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
url: "https://pub.dev"
source: hosted
version: "9.4.7"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.dev"
source: hosted
version: "0.1.3+5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
url: "https://pub.dev"
source: hosted
version: "4.3.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser:
petitparser:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -416,6 +688,14 @@ packages:
...
@@ -416,6 +688,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.4.0"
version: "1.4.0"
sanitize_html:
dependency: transitive
description:
name: sanitize_html
sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
shared_preferences:
shared_preferences:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -501,6 +781,14 @@ packages:
...
@@ -501,6 +781,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1.4"
version: "2.1.4"
stream_transform:
dependency: transitive
description:
name: stream_transform
sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871
url: "https://pub.dev"
source: hosted
version: "2.1.1"
string_scanner:
string_scanner:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -597,6 +885,14 @@ packages:
...
@@ -597,6 +885,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.1.4"
version: "3.1.4"
uuid:
dependency: transitive
description:
name: uuid
sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8
url: "https://pub.dev"
source: hosted
version: "4.5.2"
vector_graphics:
vector_graphics:
dependency: transitive
dependency: transitive
description:
description:
...
...
pubspec.yaml
View file @
97403192
...
@@ -48,6 +48,11 @@ dependencies:
...
@@ -48,6 +48,11 @@ dependencies:
url_launcher
:
^6.3.2
url_launcher
:
^6.3.2
path_provider
:
^2.1.5
path_provider
:
^2.1.5
open_filex
:
^4.7.0
open_filex
:
^4.7.0
google_maps_flutter
:
^2.14.0
geolocator
:
^14.0.2
location
:
^8.0.1
permission_handler
:
^12.0.1
geocoding
:
^4.0.0
razorpay_flutter
:
^1.4.0
razorpay_flutter
:
^1.4.0
dev_dependencies
:
dev_dependencies
:
...
...
windows/flutter/generated_plugin_registrant.cc
View file @
97403192
...
@@ -7,11 +7,17 @@
...
@@ -7,11 +7,17 @@
#include "generated_plugin_registrant.h"
#include "generated_plugin_registrant.h"
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <geolocator_windows/geolocator_windows.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
#include <url_launcher_windows/url_launcher_windows.h>
void
RegisterPlugins
(
flutter
::
PluginRegistry
*
registry
)
{
void
RegisterPlugins
(
flutter
::
PluginRegistry
*
registry
)
{
ConnectivityPlusWindowsPluginRegisterWithRegistrar
(
ConnectivityPlusWindowsPluginRegisterWithRegistrar
(
registry
->
GetRegistrarForPlugin
(
"ConnectivityPlusWindowsPlugin"
));
registry
->
GetRegistrarForPlugin
(
"ConnectivityPlusWindowsPlugin"
));
GeolocatorWindowsRegisterWithRegistrar
(
registry
->
GetRegistrarForPlugin
(
"GeolocatorWindows"
));
PermissionHandlerWindowsPluginRegisterWithRegistrar
(
registry
->
GetRegistrarForPlugin
(
"PermissionHandlerWindowsPlugin"
));
UrlLauncherWindowsRegisterWithRegistrar
(
UrlLauncherWindowsRegisterWithRegistrar
(
registry
->
GetRegistrarForPlugin
(
"UrlLauncherWindows"
));
registry
->
GetRegistrarForPlugin
(
"UrlLauncherWindows"
));
}
}
windows/flutter/generated_plugins.cmake
View file @
97403192
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
list
(
APPEND FLUTTER_PLUGIN_LIST
list
(
APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
connectivity_plus
geolocator_windows
permission_handler_windows
url_launcher_windows
url_launcher_windows
)
)
...
...
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