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
f3a137b2
Commit
f3a137b2
authored
Nov 12, 2025
by
Sai Srinivas
Committed by
Sai Srinivas
Nov 14, 2025
Browse files
12-11-2025 generator Details Screen and sub screens
parent
dd6e2bd2
Changes
220
Hide whitespace changes
Inline
Side-by-side
lib/Screens/TransactionScreens/BillDetailScreen.dart
View file @
f3a137b2
...
@@ -57,9 +57,10 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -57,9 +57,10 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
title:
const
Text
(
title:
const
Text
(
"Bill Details"
,
"Bill Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
16
,
color:
Colors
.
black87
,
color:
Colors
.
black87
,
fontFamily:
"Poppins"
,
fontFamily:
"Poppins"
,
fontWeight:
FontWeight
.
w
6
00
,
fontWeight:
FontWeight
.
w
5
00
,
),
),
),
),
leading:
IconButton
(
leading:
IconButton
(
...
@@ -73,7 +74,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -73,7 +74,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
//
🔔
Pending Icon
// Pending Icon
Container
(
Container
(
height:
70
,
height:
70
,
width:
70
,
width:
70
,
...
@@ -82,14 +83,14 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -82,14 +83,14 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
shape:
BoxShape
.
circle
,
shape:
BoxShape
.
circle
,
),
),
child:
const
Icon
(
child:
const
Icon
(
Icons
.
access_time
,
Icons
.
access_time
_filled
,
color:
Colors
.
redAccent
,
color:
Colors
.
redAccent
,
size:
44
,
size:
55
,
),
),
),
),
const
SizedBox
(
height:
14
),
const
SizedBox
(
height:
14
),
//
💰
Amount
// Amount
Text
(
Text
(
"₹
${details.totalAmount ?? "0"}
"
,
"₹
${details.totalAmount ?? "0"}
"
,
style:
const
TextStyle
(
style:
const
TextStyle
(
...
@@ -114,7 +115,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -114,7 +115,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
const
SizedBox
(
height:
16
),
const
SizedBox
(
height:
16
),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
_buildSectionTitle
(
"Product Names"
),
_buildSectionTitle
(
"Product Names"
),
//
🧾
Product Names
// Product Names
if
(
products
.
isNotEmpty
)
if
(
products
.
isNotEmpty
)
Column
(
Column
(
children:
products
children:
products
...
@@ -136,7 +137,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -136,7 +137,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
//
📄
Bill Details
// Bill Details
_buildSectionTitle
(
"Bill Details"
),
_buildSectionTitle
(
"Bill Details"
),
_buildRow
(
"Date"
,
details
.
createdDate
??
"--"
),
_buildRow
(
"Date"
,
details
.
createdDate
??
"--"
),
_buildRow
(
"Complaint ID"
,
"#
${details.compId ?? "--"}
"
,
_buildRow
(
"Complaint ID"
,
"#
${details.compId ?? "--"}
"
,
...
@@ -147,7 +148,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -147,7 +148,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
//
💸
Amount Details
// Amount Details
_buildSectionTitle
(
"Amount Details"
),
_buildSectionTitle
(
"Amount Details"
),
_buildRow
(
"Basic Amount"
,
"₹
${details.basicAmount ?? "0"}
"
),
_buildRow
(
"Basic Amount"
,
"₹
${details.basicAmount ?? "0"}
"
),
_buildRow
(
"CGST Amount"
,
"₹
${details.cgst ?? "0"}
"
),
_buildRow
(
"CGST Amount"
,
"₹
${details.cgst ?? "0"}
"
),
...
@@ -158,7 +159,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -158,7 +159,7 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
//
🧾
Bill Summary
// Bill Summary
_buildSectionTitle
(
"Bill Summary"
),
_buildSectionTitle
(
"Bill Summary"
),
_buildRow
(
"Bill Balance Amount"
,
_buildRow
(
"Bill Balance Amount"
,
"₹
${details.balancePaymentAmount ?? "0"}
"
),
"₹
${details.balancePaymentAmount ?? "0"}
"
),
...
@@ -168,56 +169,74 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
...
@@ -168,56 +169,74 @@ class _BillDetailScreenState extends State<BillDetailScreen> {
// Buttons Row
// Buttons Row
Row
(
Row
(
children:
[
children:
[
// Expanded(
/// Download Bill Button
// child: OutlinedButton.icon(
Expanded
(
// onPressed: provider.isDownloading
child:
OutlinedButton
.
icon
(
// ? null
onPressed:
provider
.
isDownloading
// : () {
?
null
// provider.downloadBill(
:
()
{
// context,
provider
.
downloadBill
(
// widget.sessionId,
context
,
// widget.billId,
widget
.
sessionId
,
// widget.accId,
widget
.
billId
,
// );
widget
.
accId
,
// },
);
// style: OutlinedButton.styleFrom(
},
// padding: const EdgeInsets.symmetric(vertical: 14),
icon:
provider
.
isDownloading
// shape: RoundedRectangleBorder(
?
const
SizedBox
(
// borderRadius: BorderRadius.circular(10),
width:
16
,
// ),
height:
16
,
// side: const BorderSide(color: Color(0xFF2563EB)),
child:
CircularProgressIndicator
(
// ),
color:
Colors
.
black87
,
// icon: const Icon(Icons.download,
strokeWidth:
2
,
// color: Color(0xFF2563EB)),
),
// label: const Text(
)
// "Download",
:
const
Icon
(
// style: TextStyle(
Icons
.
download
,
// color: Color(0xFF2563EB),
size:
18
,
// fontFamily: "Poppins",
color:
Colors
.
black87
,
// fontWeight: FontWeight.w600,
),
// ),
label:
Text
(
// ),
provider
.
isDownloading
?
"Downloading..."
:
"Download Bill"
,
// ),
style:
const
TextStyle
(
// ),
fontSize:
14
,
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
black87
,
),
),
style:
OutlinedButton
.
styleFrom
(
side:
const
BorderSide
(
color:
Colors
.
black54
,
width:
0.6
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
28
),
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
18
),
backgroundColor:
Colors
.
transparent
,
),
),
),
const
SizedBox
(
width:
12
),
const
SizedBox
(
width:
12
),
/// Pay Now Button
Expanded
(
Expanded
(
child:
ElevatedButton
(
child:
ElevatedButton
(
onPressed:
()
{
onPressed:
()
{
//
TODO: integrate
Razorpay or Payment
logic here
// Razorpay or Payment
},
},
style:
ElevatedButton
.
styleFrom
(
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
const
Color
(
0xFF2563EB
),
backgroundColor:
AppColors
.
amountText
,
padding:
const
EdgeInsets
.
symmetric
(
vertical:
14
),
shape:
RoundedRectangleBorder
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
10
),
borderRadius:
BorderRadius
.
circular
(
28
),
),
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
18
),
elevation:
0
,
// Keeps both buttons flat and uniform
),
),
child:
const
Text
(
child:
const
Text
(
"Pay Now"
,
"Pay Now"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
white
,
color:
Colors
.
white
,
fontFamily:
"Poppins"
,
fontWeight:
FontWeight
.
w600
,
),
),
),
),
),
),
...
...
lib/Screens/TransactionScreens/PaymentDetails.dart
View file @
f3a137b2
...
@@ -66,7 +66,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -66,7 +66,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
:
Column
(
:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
children:
[
//
❌
Close button
// Close button
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
end
,
mainAxisAlignment:
MainAxisAlignment
.
end
,
children:
[
children:
[
...
@@ -78,7 +78,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -78,7 +78,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
],
],
),
),
//
✅
Success icon
// Success icon
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
Container
(
Container
(
height:
64
,
height:
64
,
...
@@ -96,7 +96,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -96,7 +96,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
const
SizedBox
(
height:
16
),
const
SizedBox
(
height:
16
),
//
💰
Amount & Status
// Amount & Status
Text
(
Text
(
"₹
${paymentData.amount ?? "--"}
"
,
"₹
${paymentData.amount ?? "--"}
"
,
style:
const
TextStyle
(
style:
const
TextStyle
(
...
@@ -116,23 +116,12 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -116,23 +116,12 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
),
),
),
),
const
SizedBox
(
height:
6
),
const
SizedBox
(
height:
6
),
// 🔹 Product name / bill name (example static or from API)
Text
(
"5KV Silent Diesel Generator"
,
style:
TextStyle
(
color:
AppColors
.
amountText
,
fontFamily:
"Poppins"
,
fontWeight:
FontWeight
.
w600
,
decoration:
TextDecoration
.
underline
,
),
),
const
SizedBox
(
height:
16
),
const
SizedBox
(
height:
16
),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
//
🧾
Transaction Info Section
// Transaction Info Section
const
Align
(
const
Align
(
alignment:
Alignment
.
centerLeft
,
alignment:
Alignment
.
centerLeft
,
child:
Text
(
child:
Text
(
...
@@ -154,7 +143,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -154,7 +143,7 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
Divider
(
thickness:
1
,
color:
Color
(
0xFFE6E6E6
)),
const
SizedBox
(
height:
8
),
const
SizedBox
(
height:
8
),
//
💳
Payment Details
// Payment Details
const
Align
(
const
Align
(
alignment:
Alignment
.
centerLeft
,
alignment:
Alignment
.
centerLeft
,
child:
Text
(
child:
Text
(
...
@@ -173,17 +162,36 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -173,17 +162,36 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
const
SizedBox
(
height:
24
),
const
SizedBox
(
height:
24
),
//
📥
Download Button
// Download Button
SizedBox
(
SizedBox
(
width:
double
.
infinity
,
width:
double
.
infinity
,
child:
ElevatedButton
.
icon
(
child:
ElevatedButton
.
icon
(
onPressed:
()
{
onPressed:
provider
.
isDownloading
// TODO: connect to downloadReceipt method
?
null
:
()
async
{
await
provider
.
downloadPaymentReceipt
(
context
,
widget
.
sessionId
,
widget
.
billId
,
widget
.
accId
,
);
},
},
icon:
const
Icon
(
Icons
.
download
,
color:
Colors
.
white
,
size:
18
),
icon:
provider
.
isDownloading
label:
const
Text
(
?
const
SizedBox
(
"Download Receipt"
,
width:
18
,
style:
TextStyle
(
height:
18
,
child:
CircularProgressIndicator
(
strokeWidth:
2
,
color:
Colors
.
white
,
),
)
:
const
Icon
(
Icons
.
download
,
color:
Colors
.
white
,
size:
18
),
label:
Text
(
provider
.
isDownloading
?
"Downloading..."
:
"Download Receipt"
,
style:
const
TextStyle
(
fontSize:
15
,
fontSize:
15
,
fontFamily:
"Poppins"
,
fontFamily:
"Poppins"
,
fontWeight:
FontWeight
.
w600
,
fontWeight:
FontWeight
.
w600
,
...
@@ -195,7 +203,8 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
...
@@ -195,7 +203,8 @@ class _PaymentdetailDialogState extends State<PaymentdetailDialog> {
shape:
RoundedRectangleBorder
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
50
),
borderRadius:
BorderRadius
.
circular
(
50
),
),
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
14
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
14
),
),
),
),
),
),
),
...
...
lib/Screens/TransactionListScreen.dart
→
lib/Screens/
TransactionScreens/
TransactionListScreen.dart
View file @
f3a137b2
...
@@ -3,8 +3,8 @@ import 'package:flutter_svg/flutter_svg.dart';
...
@@ -3,8 +3,8 @@ import 'package:flutter_svg/flutter_svg.dart';
import
'package:gen_service/Screens/TransactionScreens/BillDetailScreen.dart'
;
import
'package:gen_service/Screens/TransactionScreens/BillDetailScreen.dart'
;
import
'package:gen_service/Screens/TransactionScreens/PaymentDetails.dart'
;
import
'package:gen_service/Screens/TransactionScreens/PaymentDetails.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'../Notifiers/TransactionsProvider.dart'
;
import
'../
../
Notifiers/TransactionsProvider.dart'
;
import
'../Utility/AppColors.dart'
;
import
'../
../
Utility/AppColors.dart'
;
class
TransactionListScreen
extends
StatefulWidget
{
class
TransactionListScreen
extends
StatefulWidget
{
final
String
accId
;
final
String
accId
;
...
@@ -41,7 +41,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
...
@@ -41,7 +41,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
final
totalCredit
=
provider
.
transactionList
?.
totalCredit
??
"0"
;
final
totalCredit
=
provider
.
transactionList
?.
totalCredit
??
"0"
;
final
totalDebit
=
provider
.
transactionList
?.
totalDebit
??
"0"
;
final
totalDebit
=
provider
.
transactionList
?.
totalDebit
??
"0"
;
final
transactions
=
provider
.
transactionList
?.
transactions
??
{};
final
transactions
=
provider
.
transactionList
?.
transactions
??
{};
bool
isPending
=
balanceType
.
toLowerCase
()
==
"pending"
;
bool
isPending
=
balanceType
.
toLowerCase
()
==
"pending
balance
"
;
return
RefreshIndicator
.
adaptive
(
return
RefreshIndicator
.
adaptive
(
...
@@ -72,7 +72,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
...
@@ -72,7 +72,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
stretchModes:
const
[
StretchMode
.
zoomBackground
],
stretchModes:
const
[
StretchMode
.
zoomBackground
],
background:
Container
(
background:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
gradient:
balanceType
==
"
Pending
"
?
AppColors
.
balanceBarGradientP
:
AppColors
.
balanceBarGradientA
,
gradient:
is
Pending
?
AppColors
.
balanceBarGradientP
:
AppColors
.
balanceBarGradientA
,
),
),
child:
SafeArea
(
child:
SafeArea
(
...
@@ -104,6 +104,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
...
@@ -104,6 +104,7 @@ class _TransactionScreenState extends State<TransactionListScreen> {
style:
const
TextStyle
(
color:
Colors
.
white70
,
fontSize:
16
),
style:
const
TextStyle
(
color:
Colors
.
white70
,
fontSize:
16
),
),
),
const
SizedBox
(
height:
10
),
const
SizedBox
(
height:
10
),
if
(
isPending
)
ElevatedButton
(
ElevatedButton
(
onPressed:
()
{},
onPressed:
()
{},
style:
ElevatedButton
.
styleFrom
(
style:
ElevatedButton
.
styleFrom
(
...
@@ -298,9 +299,9 @@ class _TransactionScreenState extends State<TransactionListScreen> {
...
@@ -298,9 +299,9 @@ class _TransactionScreenState extends State<TransactionListScreen> {
children:
[
children:
[
CircleAvatar
(
CircleAvatar
(
radius:
20
,
radius:
20
,
backgroundColor:
backgroundColor:
isCredit
?
Color
(
0xFFE7FFE5
)
:
Color
(
0xffFFEFEF
),
isCredit
?
Colors
.
green
.
shade50
:
Colors
.
red
.
shade50
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
color:
isCredit
?
Color
(
0xff4CAF50
)
:
Color
(
0xFFF00000
),
isCredit
isCredit
?
"assets/svg/cross_up_arrow.svg"
?
"assets/svg/cross_up_arrow.svg"
:
"assets/svg/cross_down_arrow.svg"
,
:
"assets/svg/cross_down_arrow.svg"
,
...
...
lib/Screens/amcQuotationListScreen.dart
0 → 100644
View file @
f3a137b2
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../Notifiers/generatorDetailsProvider.dart'
;
import
'../Utility/AppColors.dart'
;
class
AmcQuotationListScreen
extends
StatefulWidget
{
final
accId
;
final
sessionId
;
final
genid
;
const
AmcQuotationListScreen
({
super
.
key
,
required
this
.
accId
,
required
this
.
sessionId
,
required
this
.
genid
});
@override
State
<
AmcQuotationListScreen
>
createState
()
=>
_AmcQuotationListScreenState
();
}
class
_AmcQuotationListScreenState
extends
State
<
AmcQuotationListScreen
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
provider
.
fetchAmcQuotationList
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genid
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Generatordetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
isLoading
=
provider
.
isLoading
;
final
error
=
provider
.
errorMessage
;
final
response
=
provider
.
amcQuotationResponse
;
final
data
=
response
?.
amcQuotations
??[];
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
(
"AMC Quotation 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
)
{
return
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
data
[
j
].
amcStatus
==
"1"
?
Color
(
0xFFD7F0FF
)
:
Color
(
0xFFE0E0E0
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Column
(
children:
[
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
Border
.
all
(
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
buttonColor
:
Colors
.
white
,
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
SvgPicture
.
asset
(
"assets/svg/tick_ic.svg"
,
height:
14
,
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
const
SizedBox
(
width:
4
),
Text
(
"AMC "
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
),
Text
(
"Protected"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
normalText
:
AppColors
.
subtitleText
,
),
),
const
SizedBox
(
width:
4
),
if
(
data
[
j
].
amcStatus
==
"2"
)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
12
,
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
horizontal:
5
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
successBG
:
Color
(
0xFFFFF8D2
),
),
child:
Center
(
child:
Text
(
data
[
j
].
expNote
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
success
:
AppColors
.
error
,
),
),
),
),
],
),
Divider
(
color:
Color
(
0xFF777777
),
thickness:
0.3
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"Purchased On"
,
style:
TextStyle
(
color:
AppColors
.
subtitleText
,
fontSize:
12
,
),
),
Text
(
data
[
j
].
purchaseDate
!),
],
),
Text
(
"₹
${data[j].price}
"
??
"-"
,
style:
TextStyle
(
color:
data
[
j
].
amcStatus
==
"1"
?
AppColors
.
buttonColor
:
AppColors
.
nearDarkText
,
fontSize:
14
,
),
),
],
),
],
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
rowText
(
data
[
j
].
noOfVisits
,
"No. of Visits"
),
rowText
(
data
[
j
].
noOfOilServices
,
"No. of Oil Services"
),
],
),
),
],
),
);
},
),
],
),
),
),
),
],
),
),
);
},
);
}
Widget
rowText
(
text1
,
text2
)
{
return
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Container
(
height:
20
,
width:
20
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
text1
,
style:
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
12
),
),
),
),
SizedBox
(
width:
5
),
Text
(
text2
,
style:
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
12
),
),
],
);
}
}
lib/Screens/complaintListScreen.dart
0 → 100644
View file @
f3a137b2
// import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
// import 'package:flutter_svg/svg.dart';
// import 'package:provider/provider.dart';
//
// import '../Notifiers/generatorDetailsProvider.dart';
// import '../Utility/AppColors.dart';
//
// class ComplaintListScreen extends StatefulWidget {
// final accId;
// final sessionId;
// const ComplaintListScreen({super.key,required this.accId,required this.sessionId});
//
// @override
// State<ComplaintListScreen> createState() => _ComplaintListScreenState();
// }
//
// class _ComplaintListScreenState extends State<ComplaintListScreen> {
// @override
// void initState() {
// // TODO: implement initState
// super.initState();
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// final provider = Provider.of<Generatordetailsprovider>(
// context,
// listen: false,
// );
// provider.fetchComplaintList(widget.accId, widget.sessionId);
// });
// }
//
// @override
// Widget build(BuildContext context) {
// return Consumer<Generatordetailsprovider>(
// builder: (context, provider, child) {
// final isLoading = provider.isLoading;
// final error = provider.errorMessage;
// final response = provider.complaintResponse;
//
// final data = response?.complaintList??[];
//
// 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(
// "Complaint 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) {
// return Container(
// padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
// margin: const EdgeInsets.symmetric(vertical: 5, horizontal: 10),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(14),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Expanded(
// flex: 7,
// child: SizedBox(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// RichText(
// text: TextSpan(
// style: const TextStyle(
// fontFamily: 'Poppins',
// color: Color(0xFF008CDE),
// fontSize: 14,
// ),
// children: [
// TextSpan(text: "#${data[j].id}"),
// TextSpan(text: " | ${data[j].complaintName}"),
// ],
// ),
// ),
// Text(
// "${data[j].registredDate}",
// style: TextStyle(
// color: AppColors.subtitleText,
// fontSize: 12,
// ),
// ),
// ],
// ),
// ),
// ),
//
// Expanded(
// flex: 3,
// child: Container(
// padding: EdgeInsets.symmetric(vertical: 6, horizontal: 10),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: AppColors.successBG,
// ),
// child: Center(
// child: Text(
// "${data[j].openStatus}",
// style: TextStyle(fontSize: 14, color: AppColors.success),
// ),
// ),
// ),
// ),
// ],
// ),
// Divider(color: Color(0xFF777777), thickness: 0.3),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Expanded(
// flex: 5,
// child: Text(
// "${data[j].productName}",
// overflow: TextOverflow.ellipsis,
// maxLines: 2,
// style: const TextStyle(
// color: AppColors.nearDarkText,
// fontSize: 12,
// ),
// ),
// ),
// Expanded(
// flex: 5,
// child: RichText(
// maxLines: 1,
// textAlign: TextAlign.right,
// text: TextSpan(
// style: TextStyle(
// fontFamily: 'Poppins',
// color: AppColors.subtitleText,
// fontSize: 12,
// ),
// children: [
// TextSpan(text: "#${data[j].hashId}"),
// TextSpan(text: " | Engine: ${data[j].modelName}"),
// ],
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// );
// },
// ),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// ),
// );
// },
// );
// }
// }
lib/Screens/generatorDetailsScreen.dart
0 → 100644
View file @
f3a137b2
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:gen_service/Notifiers/generatorDetailsProvider.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/ComplaintListScreen.dart'
;
import
'package:gen_service/Screens/HelpAndComplaintScreens/SelectOrderHelpScreen.dart'
;
import
'package:gen_service/Screens/amcQuotationListScreen.dart'
;
import
'package:gen_service/Screens/complaintListScreen.dart'
;
import
'package:gen_service/Screens/quotationListScreen.dart'
;
import
'package:gen_service/Screens/scheduleListScreen.dart'
;
import
'package:provider/provider.dart'
;
import
'../Models/generatorDetailsResponse.dart'
;
import
'../Utility/AppColors.dart'
;
class
Generatordetailsscreen
extends
StatefulWidget
{
final
accId
;
final
sessionId
;
final
genId
;
const
Generatordetailsscreen
({
super
.
key
,
required
this
.
accId
,
required
this
.
sessionId
,
required
this
.
genId
,
});
@override
State
<
Generatordetailsscreen
>
createState
()
=>
_GeneratordetailsscreenState
();
}
class
_GeneratordetailsscreenState
extends
State
<
Generatordetailsscreen
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
detailsProvider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
detailsProvider
.
fetchGeneratorDetails
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genId
,
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Generatordetailsprovider
>(
builder:
(
context
,
detailsProvider
,
child
)
{
final
isLoading
=
detailsProvider
.
isLoading
;
final
error
=
detailsProvider
.
errorMessage
;
final
data
=
detailsProvider
.
detailsResponse
;
final
genDetails
=
data
!.
genDetails
??
GenDetails
();
final
locDetails
=
data
!.
locationDetails
??
LocationDetails
();
final
quotationsList
=
data
.
quotations
??[];
final
scheduleList
=
data
.
schedule
??
[];
final
amcQuotationsList
=
data
.
amcQuotations
??[];
final
complaintList
=
data
.
complaints
??[];
List
<
String
>
sectionTitles
=
[
"Generator Details"
,
"Location Details"
];
List
<
String
>
headings1
=
[
"Date of Engine Purchase"
,
"Alternator No."
,
"Engine Model"
,
"Battery No."
,
"Commissioning Date"
,
"Dispatch Date"
,
];
List
<
String
>
subHeadings1
=
[
genDetails
!.
purchaseDate
??
"-"
,
genDetails
!.
altNo
??
"-"
,
genDetails
!.
modelName
??
"-"
,
genDetails
!.
batterNo
??
"-"
,
genDetails
!.
commisDate
??
"-"
,
genDetails
!.
dispDate
??
"-"
,
];
List
<
String
>
headings2
=
[
"District"
,
"State"
,
"Address"
];
List
<
String
>
subHeadings2
=
[
locDetails
!.
districtName
??
"-"
,
locDetails
!.
stateName
??
"-"
,
locDetails
!.
address
??
"-"
,
];
List
<
List
<
String
>>
headings
=
[
headings1
,
headings2
];
List
<
List
<
String
>>
subHeadings
=
[
subHeadings1
,
subHeadings2
];
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
SafeArea
(
maintainBottomViewPadding:
true
,
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
backgroundColor:
Color
(
0xFF4076FF
),
appBar:
AppBar
(
backgroundColor:
Color
(
0xFF4076FF
),
automaticallyImplyLeading:
false
,
// elevation: 2.0,
title:
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
(
"Generator Details"
,
overflow:
TextOverflow
.
ellipsis
,
maxLines:
1
,
style:
TextStyle
(
fontSize:
16
,
color:
Colors
.
white
,
height:
1.1
,
),
),
),
),
],
),
),
),
body:
CustomScrollView
(
slivers:
[
SliverToBoxAdapter
(
child:
Container
(
color:
const
Color
(
0xFF4076FF
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
12
,
),
child:
Column
(
children:
[
// Product Info Row
Row
(
children:
[
Expanded
(
flex:
5
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
style:
const
TextStyle
(
fontFamily:
'Poppins'
,
color:
Color
(
0xFF48F3FF
),
fontSize:
12
,
),
children:
[
TextSpan
(
text:
"#
${data.hashId!}
"
),
TextSpan
(
text:
" | Engine:
${data.engine!}
"
,
),
],
),
),
Text
(
data
.
prodName
!,
maxLines:
2
,
style:
const
TextStyle
(
color:
Colors
.
white
,
fontSize:
14
,
),
),
if
(
data
.
amc
!=
"0"
)
...[
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
SvgPicture
.
asset
(
"assets/svg/tick_ic.svg"
,
height:
15
,
color:
data
.
amc
==
"1"
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
const
SizedBox
(
width:
4
),
Text
(
"AMC "
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
.
amc
==
"1"
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
),
Text
(
"Protected"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
.
amc
==
"1"
?
AppColors
.
normalText
:
AppColors
.
subtitleText
,
),
),
const
SizedBox
(
width:
4
),
if
(
data
.
amc
==
"2"
)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
15
,
),
],
),
],
if
(
data
.
warranty
!=
"0"
)
...[
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Row
(
children:
[
SvgPicture
.
asset
(
"assets/svg/tick2_ic.svg"
,
height:
15
,
color:
data
.
warranty
==
"1"
?
AppColors
.
warning
:
AppColors
.
subtitleText
,
),
const
SizedBox
(
width:
6
),
Text
(
"Warranty"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
.
warranty
==
"1"
?
AppColors
.
normalText
:
AppColors
.
subtitleText
,
),
),
SizedBox
(
width:
6
),
if
(
data
.
warranty
==
"2"
)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
15
,
),
],
),
],
),
],
],
),
),
Expanded
(
flex:
2
,
child:
Image
.
network
(
data
.
prodImg
!,
fit:
BoxFit
.
scaleDown
,
),
),
],
),
// Show More Details
if
(
detailsProvider
.
showMoreDetails
)
...[
const
Divider
(
color:
Colors
.
white
),
...
List
.
generate
(
headings
.
length
,
(
index
)
{
final
sectionTitle
=
sectionTitles
[
index
];
final
sectionItems
=
headings
[
index
];
final
sectionSubItems
=
subHeadings
[
index
];
return
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
12
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
height:
25
,
width:
25
,
decoration:
const
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Colors
.
white
,
),
child:
Center
(
child:
Text
(
index
==
0
?
"🔧"
:
"📍"
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
),
const
SizedBox
(
width:
8
),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
sectionTitle
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
white
,
fontSize:
16
,
),
),
const
SizedBox
(
height:
8
),
...
List
.
generate
(
sectionItems
.
length
,
(
i
,
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
sectionItems
[
i
]??
"-"
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF48F3FF
),
),
),
),
Expanded
(
child:
Text
(
sectionSubItems
[
i
]??
"-"
,
maxLines:
3
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
end
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
,
),
),
),
],
),
);
}),
],
),
),
],
),
);
}),
],
Center
(
child:
InkResponse
(
onTap:
()
=>
detailsProvider
.
showMoreDetails
=
!
detailsProvider
.
showMoreDetails
,
child:
Container
(
width:
125
,
margin:
const
EdgeInsets
.
only
(
top:
5
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
6
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
border:
Border
.
all
(
color:
Colors
.
white
,
width:
0.7
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
detailsProvider
.
showMoreDetails
?
"Hide Details"
:
"View Details"
,
style:
const
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Colors
.
white
,
),
),
const
SizedBox
(
width:
4
),
Transform
.
flip
(
flipY:
detailsProvider
.
showMoreDetails
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
12
,
width:
12
,
colorFilter:
const
ColorFilter
.
mode
(
Colors
.
white
,
BlendMode
.
srcIn
,
),
),
),
],
),
),
),
),
const
SizedBox
(
height:
10
),
],
),
),
),
SliverFillRemaining
(
hasScrollBody:
false
,
child:
Container
(
decoration:
const
BoxDecoration
(
color:
AppColors
.
backgroundRegular
,
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
30
),
topRight:
Radius
.
circular
(
30
),
),
),
padding:
const
EdgeInsets
.
fromLTRB
(
5
,
20
,
5
,
30
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
if
(
scheduleList
.
isNotEmpty
)
...[
sectionHeading
(
"Scheduled Services"
),
...
List
.
generate
(
scheduleList
.
length
,
(
i
)
=>
_buildListItem
(
scheduleList
[
i
]),
),
],
if
(
quotationsList
.
isNotEmpty
)
...[
sectionHeading
(
"Quotations"
),
...
List
.
generate
(
quotationsList
.
length
,
(
i
)
=>
_buildListItem1
(
quotationsList
[
i
]!.
title
??
"-"
,
quotationsList
[
i
]!.
date
??
"-"
,
),
),
],
if
(
complaintList
.
isNotEmpty
)
...[
sectionHeading
(
"Complaint Details"
),
...
List
.
generate
(
1
,
(
i
)
=>
_buildListItem2
(
complaintList
[
i
]),
),
],
SizedBox
(
height:
10
),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
SelectOrderHelpScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
))
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
14
),
child:
Container
(
padding:
const
EdgeInsets
.
all
(
20
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFD7F0FF
),
borderRadius:
BorderRadius
.
circular
(
16
),
border:
Border
.
all
(
width:
1.5
,
color:
AppColors
.
buttonColor
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
const
[
Text
(
'Facing Issues?'
,
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w500
,
color:
AppColors
.
amountText
,
),
),
Text
(
'Raise a ticket to resolve your issues.'
,
style:
TextStyle
(
fontSize:
12
,
fontWeight:
FontWeight
.
w400
,
color:
AppColors
.
subtitleText
,
),
),
],
),
SvgPicture
.
asset
(
"assets/svg/requirements.svg"
,
height:
32
,
width:
32
,
),
],
),
),
),
),
if
(
amcQuotationsList
.
isNotEmpty
)
...[
sectionHeading
(
"AMC Quotation Details"
),
...
List
.
generate
(
amcQuotationsList
.
length
,
(
i
)
=>
_buildListItem3
(
amcQuotationsList
[
i
]!),
),
],
],
),
),
),
],
),
),
);
},
);
}
Widget
sectionHeading
(
text
)
{
return
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
text
,
style:
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
14
),
),
InkResponse
(
onTap:
()
async
{
var
redirectScreen
;
switch
(
text
)
{
case
"Scheduled Services"
:
redirectScreen
=
ScheduleListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
genId:
widget
.
genId
,
);
break
;
case
"Quotations"
:
redirectScreen
=
QuotationListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
genId:
widget
.
genId
,
);
break
;
case
"Complaint Details"
:
redirectScreen
=
ComplaintListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
);
break
;
case
"AMC Quotation Details"
:
redirectScreen
=
AmcQuotationListScreen
(
accId:
widget
.
accId
,
sessionId:
widget
.
sessionId
,
genid:
widget
.
genId
,
);
break
;
default
:
break
;
}
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
redirectScreen
),
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
),
child:
Text
(
"See All"
,
style:
TextStyle
(
color:
AppColors
.
buttonColor
,
fontSize:
14
),
),
),
),
],
),
);
}
Widget
_buildListItem
(
Schedule
data
)
{
return
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
data
.
status
==
"Scheduled"
?
Color
(
0xFFD7F0FF
)
:
Color
(
0xFFE0E0E0
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Column
(
children:
[
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
Border
.
all
(
color:
data
.
status
==
"Scheduled"
?
AppColors
.
buttonColor
:
Colors
.
white
,
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
if
(
data
.
status
==
"Scheduled"
)
...[
SvgPicture
.
asset
(
"assets/svg/calendar_ic.svg"
),
SizedBox
(
width:
8
),
],
SizedBox
(
child:
Column
(
children:
[
if
(
data
.
status
==
"Completed"
)
...[
Text
(
data
.
complaintType
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
nearDarkText
,
),
),
],
Text
(
data
.
date
??
"-"
,
style:
TextStyle
(
fontSize:
data
.
status
==
"Scheduled"
?
14
:
12
,
color:
data
.
status
==
"Scheduled"
?
AppColors
.
nearDarkText
:
Color
(
0xFF777777
),
),
),
],
),
),
Spacer
(),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
horizontal:
5
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
data
.
status
==
"Scheduled"
?
AppColors
.
successBG
:
Color
(
0xFFFFF8D2
),
),
child:
Center
(
child:
Text
(
data
.
status
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
data
.
status
==
"Scheduled"
?
AppColors
.
success
:
AppColors
.
error
,
),
),
),
),
],
),
],
),
),
if
(
data
.
status
==
"Scheduled"
)
...[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
"Upcoming Service Scheduled"
,
style:
TextStyle
(
fontSize:
12
,
color:
AppColors
.
buttonColor
,
),
),
],
),
),
],
],
),
);
}
Widget
_buildListItem1
(
String
left
,
String
right
)
{
return
Container
(
height:
50
,
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
left
),
Text
(
right
)],
),
);
}
Widget
_buildListItem2
(
Complaints
data
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Expanded
(
flex:
7
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
style:
const
TextStyle
(
fontFamily:
'Poppins'
,
color:
Color
(
0xFF008CDE
),
fontSize:
14
,
),
children:
[
TextSpan
(
text:
"#
${data.id}
"
),
TextSpan
(
text:
" |
${data.complaintName}
"
),
],
),
),
Text
(
"
${data.registredDate}
"
,
style:
TextStyle
(
color:
AppColors
.
subtitleText
,
fontSize:
12
,
),
),
],
),
),
),
Expanded
(
flex:
3
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
10
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
AppColors
.
successBG
,
),
child:
Center
(
child:
Text
(
"
${data.openStatus}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
success
),
),
),
),
),
],
),
Divider
(
color:
Color
(
0xFF777777
),
thickness:
0.3
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
5
,
child:
Text
(
"
${data.productName}
"
,
overflow:
TextOverflow
.
ellipsis
,
maxLines:
2
,
style:
const
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
12
,
),
),
),
Expanded
(
flex:
5
,
child:
RichText
(
maxLines:
1
,
textAlign:
TextAlign
.
right
,
text:
TextSpan
(
style:
TextStyle
(
fontFamily:
'Poppins'
,
color:
AppColors
.
subtitleText
,
fontSize:
12
,
),
children:
[
TextSpan
(
text:
"#
${data.hashId}
"
),
TextSpan
(
text:
" | Engine:
${data.modelName}
"
),
],
),
),
),
],
),
],
),
);
}
Widget
_buildListItem3
(
AmcQuotations
data
)
{
return
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
data
.
amcStatus
==
"1"
?
Color
(
0xFFD7F0FF
)
:
Color
(
0xFFE0E0E0
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Column
(
children:
[
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
Border
.
all
(
color:
data
.
amcStatus
==
"1"
?
AppColors
.
buttonColor
:
Colors
.
white
,
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
SvgPicture
.
asset
(
"assets/svg/tick_ic.svg"
,
height:
14
,
color:
data
.
amcStatus
==
"1"
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
const
SizedBox
(
width:
4
),
Text
(
"AMC "
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
.
amcStatus
==
"1"
?
AppColors
.
greenICBg
:
AppColors
.
subtitleText
,
),
),
Text
(
"Protected"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"PoppinsBold"
,
fontStyle:
FontStyle
.
italic
,
fontWeight:
FontWeight
.
w700
,
color:
data
.
amcStatus
==
"1"
?
AppColors
.
normalText
:
AppColors
.
subtitleText
,
),
),
const
SizedBox
(
width:
4
),
if
(
data
.
amcStatus
==
"2"
)
const
Icon
(
Icons
.
info_outline
,
color:
Colors
.
red
,
size:
12
,
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
horizontal:
5
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
data
.
amcStatus
==
"1"
?
AppColors
.
successBG
:
Color
(
0xFFFFF8D2
),
),
child:
Center
(
child:
Text
(
data
.
expNote
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
data
.
amcStatus
==
"1"
?
AppColors
.
success
:
AppColors
.
error
,
),
),
),
),
],
),
Divider
(
color:
Color
(
0xFF777777
),
thickness:
0.3
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"Purchased On"
,
style:
TextStyle
(
color:
AppColors
.
subtitleText
,
fontSize:
12
,
),
),
Text
(
data
.
purchaseDate
!),
],
),
Text
(
"₹
${data.price}
"
??
"-"
,
style:
TextStyle
(
color:
data
.
amcStatus
==
"1"
?
AppColors
.
buttonColor
:
AppColors
.
nearDarkText
,
fontSize:
14
,
),
),
],
),
],
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
rowText
(
data
.
noOfVisits
,
"No. of Visits"
),
rowText
(
data
.
noOfOilServices
,
"No. of Oil Services"
),
],
),
),
],
),
);
}
Widget
rowText
(
text1
,
text2
)
{
return
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Container
(
height:
20
,
width:
20
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
text1
,
style:
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
12
),
),
),
),
SizedBox
(
width:
5
),
Text
(
text2
,
style:
TextStyle
(
color:
AppColors
.
nearDarkText
,
fontSize:
12
),
),
],
);
}
}
lib/Screens/quotationListScreen.dart
0 → 100644
View file @
f3a137b2
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../Notifiers/generatorDetailsProvider.dart'
;
import
'../Utility/AppColors.dart'
;
class
QuotationListScreen
extends
StatefulWidget
{
final
accId
;
final
sessionId
;
final
genId
;
const
QuotationListScreen
({
super
.
key
,
required
this
.
accId
,
required
this
.
sessionId
,
required
this
.
genId
,
});
@override
State
<
QuotationListScreen
>
createState
()
=>
_QuotationListScreenState
();
}
class
_QuotationListScreenState
extends
State
<
QuotationListScreen
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
provider
.
fetchQuotationList
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genId
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Generatordetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
isLoading
=
provider
.
isLoading
;
final
error
=
provider
.
errorMessage
;
final
response
=
provider
.
quotationResponse
;
final
data
=
response
?.
serviceQuotation
??
[];
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
(
"Quotations 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
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Expanded
(
flex:
2
,
child:
Text
(
data
[
j
].
title
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
),
Spacer
(),
Expanded
(
flex:
1
,
child:
Text
(
data
[
j
].
date
??
"-"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(),
),
),
],
),
);
},
),
],
),
),
),
),
],
),
),
);
},
);
}
}
lib/Screens/scheduleListScreen.dart
0 → 100644
View file @
f3a137b2
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:gen_service/Notifiers/generatorDetailsProvider.dart'
;
import
'package:provider/provider.dart'
;
import
'../Utility/AppColors.dart'
;
class
ScheduleListScreen
extends
StatefulWidget
{
final
accId
;
final
sessionId
;
final
genId
;
const
ScheduleListScreen
({
super
.
key
,
required
this
.
accId
,
required
this
.
sessionId
,
required
this
.
genId
,
});
@override
State
<
ScheduleListScreen
>
createState
()
=>
_ScheduleListScreenState
();
}
class
_ScheduleListScreenState
extends
State
<
ScheduleListScreen
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
provider
=
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
);
provider
.
fetchScheduleList
(
widget
.
accId
,
widget
.
sessionId
,
widget
.
genId
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Generatordetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
isLoading
=
provider
.
isLoading
;
final
error
=
provider
.
errorMessage
;
final
response
=
provider
.
scheduleResponse
;
final
data
=
response
?.
allScheduleServices
??[];
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
(
"Schedule 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
)
{
return
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
),
decoration:
BoxDecoration
(
color:
data
[
j
].
status
==
"Scheduled"
?
Color
(
0xFFD7F0FF
)
:
Color
(
0xFFE0E0E0
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Column
(
children:
[
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
Border
.
all
(
color:
data
[
j
].
status
==
"Scheduled"
?
AppColors
.
buttonColor
:
Colors
.
white
,
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
if
(
data
[
j
].
status
==
"Scheduled"
)
...[
SvgPicture
.
asset
(
"assets/svg/calendar_ic.svg"
,
),
SizedBox
(
width:
8
),
],
SizedBox
(
child:
Column
(
children:
[
if
(
data
[
j
].
status
==
"Completed"
)
...[
Text
(
data
[
j
].
complaintType
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
nearDarkText
,
),
),
],
Text
(
data
[
j
].
dueDate
??
"-"
,
style:
TextStyle
(
fontSize:
data
[
j
].
status
==
"Scheduled"
?
14
:
12
,
color:
data
[
j
].
status
==
"Scheduled"
?
AppColors
.
nearDarkText
:
Color
(
0xFF777777
,
),
),
),
],
),
),
Spacer
(),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
horizontal:
5
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
data
[
j
].
status
==
"Scheduled"
?
AppColors
.
successBG
:
Color
(
0xFFFFF8D2
),
),
child:
Center
(
child:
Text
(
data
[
j
].
status
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
data
[
j
].
status
==
"Scheduled"
?
AppColors
.
success
:
AppColors
.
error
,
),
),
),
),
],
),
],
),
),
if
(
data
[
j
].
status
==
"Scheduled"
)
...[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
"Upcoming Service Scheduled"
,
style:
TextStyle
(
fontSize:
12
,
color:
AppColors
.
buttonColor
,
),
),
],
),
),
],
],
),
);
},
),
],
),
),
),
),
],
),
),
);
},
);
}
}
lib/Services/api_URLs.dart
View file @
f3a137b2
...
@@ -10,16 +10,23 @@ const fetchOtpUrl = "${baseUrl2}login";
...
@@ -10,16 +10,23 @@ const fetchOtpUrl = "${baseUrl2}login";
const
dashboardUrl
=
"
${baseUrl}
dashboard"
;
const
dashboardUrl
=
"
${baseUrl}
dashboard"
;
const
logoutUrl
=
"
${baseUrl2}
Rental_Auth/
logout"
;
const
logoutUrl
=
"
${baseUrl2}
logout"
;
const
profileDetailsUrl
=
"
${baseUrl
2}
Rental_Home/
profile_d
e
ta
ils
"
;
const
profileDetailsUrl
=
"
${baseUrl
}
profile_d
a
ta"
;
/// transaction and payments
/// transaction and payments
const
transactionsUrl
=
"
${baseUrl}
all_transactions"
;
const
transactionsUrl
=
"
${baseUrl}
all_transactions"
;
const
paymentDetailUrl
=
"
${baseUrl}
payment_details"
;
const
paymentDetailUrl
=
"
${baseUrl}
payment_details"
;
const
billDetailUrl
=
"
${baseUrl}
bill_details"
;
const
billDetailUrl
=
"
${baseUrl}
bill_details"
;
const
generatorDetailsUrl
=
"
${baseUrl}
generator_details"
;
const
scheduleListUrl
=
"
${baseUrl}
all_schedule_services"
;
const
quotationListUrl
=
"
${baseUrl}
all_quoatations"
;
const
amcQuoteListUrl
=
"
${baseUrl}
all_amc_quotations"
;
const
complaintListUrl
=
"
${baseUrl}
all_complaint_list"
;
const
downloadBillUrl
=
"
${baseUrl}
download_bill"
;
const
downloadRecieptUrl
=
"
${baseUrl}
download_reciept"
;
/// Help and complaints
/// Help and complaints
const
complaintListUrl
=
"
${baseUrl}
all_complaint_list"
;
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"
;
\ No newline at end of file
const
getInTouchListUrl
=
"
${baseUrl}
get_in_touch_list"
;
\ No newline at end of file
lib/Services/api_calling.dart
View file @
f3a137b2
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
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/HelpAndComplaintModels/ComplaintListResponse.dart'
;
import
'package:gen_service/Models/HelpAndComplaintModels/ComplaintListResponse.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'
;
import
'package:gen_service/Models/amcQuotationListResponse.dart'
;
import
'package:gen_service/Models/complaintListResponse.dart'
;
import
'package:gen_service/Models/generatorDetailsResponse.dart'
;
import
'package:gen_service/Models/quotationListResponse.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'
;
...
@@ -66,7 +73,7 @@ class ApiCalling {
...
@@ -66,7 +73,7 @@ class ApiCalling {
}
}
}
}
static
Future
<
CommonResponse
?>
logout
Api
(
static
Future
<
ProfileDataResponse
?>
fetchProfileData
Api
(
String
accId
,
String
accId
,
String
sessionId
,
String
sessionId
,
)
async
{
)
async
{
...
@@ -76,8 +83,32 @@ class ApiCalling {
...
@@ -76,8 +83,32 @@ class ApiCalling {
"acc_id"
:
accId
,
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"session_id"
:
sessionId
,
};
};
final
res
=
await
post
(
data
,
logoutUrl
,
{});
final
res
=
await
post
(
data
,
profileDetailsUrl
,
{});
if
(
res
!=
null
)
{
return
ProfileDataResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Profile API Error:
$e
"
);
return
null
;
}
}
static
Future
<
CommonResponse
?>
logoutApi
(
String
accId
,
String
sessionId
,
)
async
{
debugPrint
(
"########logout Api calling "
);
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
};
final
res
=
await
post
(
data
,
logoutUrl
,
{});
debugPrint
(
"Response
${res?.body}
"
);
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
...
@@ -200,10 +231,65 @@ class ApiCalling {
...
@@ -200,10 +231,65 @@ class ApiCalling {
return
null
;
return
null
;
}
}
}
}
/// Bill Download api
static
Future
<
CommonResponse
?>
billDownloadApi
(
String
sessionId
,
String
empId
,
String
accId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"bill_id"
:
empId
,
"acc_id"
:
accId
,
};
final
res
=
await
post
(
data
,
downloadBillUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (billDownload):
$e
"
);
return
null
;
}
}
/// Payment Receipt DownloadApi
static
Future
<
CommonResponse
?>
paymentReceiptDownloadApi
(
String
sessionId
,
String
ledgerId
,
String
accId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"session_id"
:
sessionId
,
"bill_id"
:
ledgerId
,
"acc_id"
:
accId
,
};
final
res
=
await
post
(
data
,
downloadRecieptUrl
,
{});
debugPrint
(
"DownloadApi Response
${res?.body}
"
);
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ API Error (billDownload):
$e
"
);
return
null
;
}
}
//___________________________________Help and Complaints
//___________________________________Help and Complaints
/// fetch
Bill Details
Api
/// fetch
Complaint list
Api
static
Future
<
ComplaintListResponse
?>
fetchComplaintsListApi
(
static
Future
<
ComplaintListResponse
?>
fetchComplaintsListApi
(
String
accId
,
String
accId
,
String
sessionId
,
String
sessionId
,
...
@@ -316,6 +402,31 @@ class ApiCalling {
...
@@ -316,6 +402,31 @@ class ApiCalling {
}
}
}
}
/// Get int touch list Api calling
static
Future
<
GetInTouchListResponse
?>
fetchGetInTouchListApi
(
String
accId
,
String
sessionId
,
)
async
{
debugPrint
(
"#########Get in touch Api calling "
);
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
};
final
res
=
await
post
(
data
,
getInTouchListUrl
,
{});
if
(
res
!=
null
)
{
return
GetInTouchListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Get in touch list API Error:
$e
"
);
return
null
;
}
}
//
//
// /// pay_amount
// /// pay_amount
// static Future<PayAmountResponse?> payAmountApi(
// static Future<PayAmountResponse?> payAmountApi(
...
@@ -349,6 +460,131 @@ class ApiCalling {
...
@@ -349,6 +460,131 @@ class ApiCalling {
// }
// }
// }
// }
//
//
static
Future
<
generatorDetailsResponse
?>
generatorDetailsAPI
(
String
accId
,
String
sessionId
,
genId
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
'gen_id'
:
genId
};
final
res
=
await
post
(
data
,
generatorDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
res
.
body
);
return
generatorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Dashboard API Error:
$e
"
);
return
null
;
}
}
static
Future
<
scheduleListResponse
?>
scheduleListAPI
(
String
accId
,
String
sessionId
,
gen_id
)
async
{
debugPrint
(
"###############################Transaction Api calling "
);
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"gen_id"
:
gen_id
,
};
final
res
=
await
post
(
data
,
scheduleListUrl
,
{});
print
(
data
);
if
(
res
!=
null
)
{
return
scheduleListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Dashboard API Error:
$e
"
);
return
null
;
}
}
static
Future
<
quotationListResponse
?>
quotationListAPI
(
String
accId
,
String
sessionId
,
genID
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"gen_id"
:
genID
,
};
final
res
=
await
post
(
data
,
quotationListUrl
,
{});
if
(
res
!=
null
)
{
return
quotationListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Dashboard API Error:
$e
"
);
return
null
;
}
}
static
Future
<
complaintListResponse
?>
complaintListAPI
(
String
accId
,
String
sessionId
,
)
async
{
debugPrint
(
"############################### Api calling "
);
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
};
final
res
=
await
post
(
data
,
complaintListUrl
,
{});
print
(
res
!.
body
);
if
(
res
!=
null
)
{
return
complaintListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Dashboard API Error:
$e
"
);
return
null
;
}
}
static
Future
<
amcQuotationListResponse
?>
amcQuoteListAPI
(
String
accId
,
String
sessionId
,
genID
)
async
{
debugPrint
(
"############################### Api calling "
);
try
{
Map
<
String
,
String
>
data
=
{
"acc_id"
:
accId
,
"session_id"
:
sessionId
,
"gen_id"
:
genID
,
};
final
res
=
await
post
(
data
,
amcQuoteListUrl
,
{});
if
(
res
!=
null
)
{
return
amcQuotationListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
"❌ Dashboard API Error:
$e
"
);
return
null
;
}
}
}
}
lib/Utility/AdvancedSnackbar.dart
View file @
f3a137b2
...
@@ -9,7 +9,7 @@ class AnimatedSnackBar {
...
@@ -9,7 +9,7 @@ class AnimatedSnackBar {
String
?
title
,
String
?
title
,
IconData
?
icon
,
IconData
?
icon
,
Color
backgroundColor
=
const
Color
(
0xFF324563
),
Color
backgroundColor
=
const
Color
(
0xFF324563
),
Duration
duration
=
const
Duration
(
seconds:
4
),
Duration
duration
=
const
Duration
(
seconds:
2
),
SnackBarAction
?
action
,
SnackBarAction
?
action
,
bool
showProgressBar
=
false
,
bool
showProgressBar
=
false
,
bool
enableHaptic
=
true
,
bool
enableHaptic
=
true
,
...
...
lib/Utility/AppColors.dart
View file @
f3a137b2
...
@@ -121,6 +121,15 @@ class AppColors {
...
@@ -121,6 +121,15 @@ class AppColors {
],
],
);
);
static
const
LinearGradient
balanceCardGradientA
=
LinearGradient
(
begin:
Alignment
.
topLeft
,
end:
Alignment
.
bottomRight
,
colors:
[
Color
(
0xFF00BBDB
),
Color
(
0xFF4076FF
),
],
);
static
const
LinearGradient
balanceBarGradientP
=
LinearGradient
(
static
const
LinearGradient
balanceBarGradientP
=
LinearGradient
(
begin:
Alignment
.
topCenter
,
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
,
end:
Alignment
.
bottomCenter
,
...
...
lib/main.dart
View file @
f3a137b2
...
@@ -3,8 +3,10 @@ import 'package:gen_service/Notifiers/AuthProvider.dart';
...
@@ -3,8 +3,10 @@ import 'package:gen_service/Notifiers/AuthProvider.dart';
import
'package:gen_service/Notifiers/TransactionsProvider.dart'
;
import
'package:gen_service/Notifiers/TransactionsProvider.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'Notifiers/ContactUsProvider.dart'
;
import
'Notifiers/DashboardProvider.dart'
;
import
'Notifiers/DashboardProvider.dart'
;
import
'Notifiers/HelpAndComplaintProvider.dart'
;
import
'Notifiers/HelpAndComplaintProvider.dart'
;
import
'Notifiers/generatorDetailsProvider.dart'
;
import
'Notifiers/theme_provider.dart'
;
import
'Notifiers/theme_provider.dart'
;
import
'Screens/AuthScreen/LoginScreen.dart'
;
import
'Screens/AuthScreen/LoginScreen.dart'
;
import
'Screens/SplashScreen.dart'
;
import
'Screens/SplashScreen.dart'
;
...
@@ -25,6 +27,8 @@ class MyApp extends StatelessWidget {
...
@@ -25,6 +27,8 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider
(
create:
(
_
)
=>
DashboardProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
DashboardProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
TransactionsProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
TransactionsProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
HelpAndComplaintProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
HelpAndComplaintProvider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Generatordetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
ContactUsProvider
()),
],
],
child:
Consumer
<
ThemeProvider
>(
child:
Consumer
<
ThemeProvider
>(
...
...
linux/flutter/generated_plugin_registrant.cc
View file @
f3a137b2
...
@@ -6,6 +6,10 @@
...
@@ -6,6 +6,10 @@
#include "generated_plugin_registrant.h"
#include "generated_plugin_registrant.h"
#include <url_launcher_linux/url_launcher_plugin.h>
void
fl_register_plugins
(
FlPluginRegistry
*
registry
)
{
void
fl_register_plugins
(
FlPluginRegistry
*
registry
)
{
g_autoptr
(
FlPluginRegistrar
)
url_launcher_linux_registrar
=
fl_plugin_registry_get_registrar_for_plugin
(
registry
,
"UrlLauncherPlugin"
);
url_launcher_plugin_register_with_registrar
(
url_launcher_linux_registrar
);
}
}
linux/flutter/generated_plugins.cmake
View file @
f3a137b2
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#
#
list
(
APPEND FLUTTER_PLUGIN_LIST
list
(
APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
)
)
list
(
APPEND FLUTTER_FFI_PLUGIN_LIST
list
(
APPEND FLUTTER_FFI_PLUGIN_LIST
...
...
macos/Flutter/GeneratedPluginRegistrant.swift
View file @
f3a137b2
...
@@ -9,10 +9,12 @@ import connectivity_plus
...
@@ -9,10 +9,12 @@ import connectivity_plus
import
device_info_plus
import
device_info_plus
import
path_provider_foundation
import
path_provider_foundation
import
shared_preferences_foundation
import
shared_preferences_foundation
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"
))
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"
))
}
}
pubspec.lock
View file @
f3a137b2
...
@@ -125,10 +125,10 @@ packages:
...
@@ -125,10 +125,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: fake_async
name: fake_async
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.3.
2
"
version: "1.3.
3
"
ffi:
ffi:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -204,26 +204,26 @@ packages:
...
@@ -204,26 +204,26 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker
name: leak_tracker
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256:
"33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1
0
.0.
8
"
version: "1
1
.0.
2
"
leak_tracker_flutter_testing:
leak_tracker_flutter_testing:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker_flutter_testing
name: leak_tracker_flutter_testing
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.
9
"
version: "3.0.
10
"
leak_tracker_testing:
leak_tracker_testing:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker_testing
name: leak_tracker_testing
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.
1
"
version: "3.0.
2
"
lints:
lints:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -272,6 +272,14 @@ packages:
...
@@ -272,6 +272,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.5.0"
version: "0.5.0"
open_filex:
dependency: "direct main"
description:
name: open_filex
sha256: "9976da61b6a72302cf3b1efbce259200cd40232643a467aac7370addf94d6900"
url: "https://pub.dev"
source: hosted
version: "4.7.0"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -289,7 +297,7 @@ packages:
...
@@ -289,7 +297,7 @@ packages:
source: hosted
source: hosted
version: "1.1.0"
version: "1.1.0"
path_provider:
path_provider:
dependency:
transitive
dependency:
"direct main"
description:
description:
name: path_provider
name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
...
@@ -489,10 +497,10 @@ packages:
...
@@ -489,10 +497,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: test_api
name: test_api
sha256:
fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
sha256:
"522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.7.
4
"
version: "0.7.
6
"
typed_data:
typed_data:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -501,6 +509,70 @@ packages:
...
@@ -501,6 +509,70 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.4.0"
version: "1.4.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
url: "https://pub.dev"
source: hosted
version: "6.3.2"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "81777b08c498a292d93ff2feead633174c386291e35612f8da438d6e92c4447e"
url: "https://pub.dev"
source: hosted
version: "6.3.20"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: d80b3f567a617cb923546034cc94bfe44eb15f989fe670b37f26abdb9d939cb7
url: "https://pub.dev"
source: hosted
version: "6.3.4"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: c043a77d6600ac9c38300567f33ef12b0ef4f4783a2c1f00231d2b1941fea13f
url: "https://pub.dev"
source: hosted
version: "3.2.3"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
vector_graphics:
vector_graphics:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -529,10 +601,10 @@ packages:
...
@@ -529,10 +601,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: vector_math
name: vector_math
sha256:
"80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
sha256:
d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.
1.4
"
version: "2.
2.0
"
vm_service:
vm_service:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -582,5 +654,5 @@ packages:
...
@@ -582,5 +654,5 @@ packages:
source: hosted
source: hosted
version: "6.5.0"
version: "6.5.0"
sdks:
sdks:
dart: ">=3.
7.2
<4.0.0"
dart: ">=3.
8.0-0
<4.0.0"
flutter: ">=3.29.0"
flutter: ">=3.29.0"
pubspec.yaml
View file @
f3a137b2
...
@@ -45,6 +45,9 @@ dependencies:
...
@@ -45,6 +45,9 @@ dependencies:
android_id
:
^0.4.0
android_id
:
^0.4.0
device_info_plus
:
^12.2.0
device_info_plus
:
^12.2.0
dropdown_button2
:
^2.3.9
dropdown_button2
:
^2.3.9
url_launcher
:
^6.3.2
path_provider
:
^2.1.5
open_filex
:
^4.7.0
dev_dependencies
:
dev_dependencies
:
flutter_test
:
flutter_test
:
...
...
windows/flutter/generated_plugin_registrant.cc
View file @
f3a137b2
...
@@ -7,8 +7,11 @@
...
@@ -7,8 +7,11 @@
#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 <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"
));
UrlLauncherWindowsRegisterWithRegistrar
(
registry
->
GetRegistrarForPlugin
(
"UrlLauncherWindows"
));
}
}
windows/flutter/generated_plugins.cmake
View file @
f3a137b2
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
list
(
APPEND FLUTTER_PLUGIN_LIST
list
(
APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
connectivity_plus
url_launcher_windows
)
)
list
(
APPEND FLUTTER_FFI_PLUGIN_LIST
list
(
APPEND FLUTTER_FFI_PLUGIN_LIST
...
...
Prev
1
…
7
8
9
10
11
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