Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
ecd8fcd1
Commit
ecd8fcd1
authored
Jul 07, 2025
by
Sai Srinivas
Browse files
07-07-2025 By Sai Srinivas
Pubspec and Safe Area.
parent
67ab0f3e
Changes
92
Hide whitespace changes
Inline
Side-by-side
lib/screens/order/addTpcAgent.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -33,247 +35,251 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
...
@@ -33,247 +35,251 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
return
Consumer
<
Tpcagentsprovider
>(
return
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
"Add TPC Agent"
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"Add TPC Agent"
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
provider
.
resetAll
,
body:
Container
(
SizedBox
(
width:
0
),
child:
SingleChildScrollView
(
),
child:
Column
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
children:
[
body:
Container
(
Container
(
child:
SingleChildScrollView
(
decoration:
BoxDecoration
(
child:
Column
(
color:
Colors
.
white
,
children:
[
borderRadius:
BorderRadius
.
circular
(
16
),
Container
(
),
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
symmetric
(
color:
Colors
.
white
,
vertical:
10
,
borderRadius:
BorderRadius
.
circular
(
16
),
horizontal:
10
,
),
),
margin:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
vertical:
10
,
horizontal:
10
,
horizontal:
10
,
),
),
padding:
EdgeInsets
.
symmetric
(
child:
Column
(
vertical:
10
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
horizontal:
10
,
mainAxisSize:
MainAxisSize
.
min
,
),
children:
[
child:
Column
(
textControllerWidget
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
context
,
mainAxisSize:
MainAxisSize
.
min
,
provider
.
tpcNameController
,
children:
[
"Name"
,
textControllerWidget
(
"Enter Name"
,
context
,
provider
.
onChangetpcName
,
provider
.
tpcNameController
,
TextInputType
.
text
,
"Name"
,
false
,
"Enter Name"
,
null
,
provider
.
onChangetpcName
,
focusNodes
[
0
],
TextInputType
.
text
,
focusNodes
[
1
],
false
,
TextInputAction
.
next
null
,
),
focusNodes
[
0
],
if
(
provider
.
tpcNameError
!=
null
)
...[
focusNodes
[
1
],
errorWidget
(
context
,
provider
.
tpcNameError
),
TextInputAction
.
next
],
),
if
(
provider
.
tpcNameError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcNameError
),
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
tpcMobileNumberController
,
provider
.
tpcMobileNumberController
,
"Mobile Number"
,
"Mobile Number"
,
"Enter Mobile Number"
,
"Enter Mobile Number"
,
provider
.
onChangetpcMobileNumber
,
provider
.
onChangetpcMobileNumber
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
1
],
focusNodes
[
1
],
focusNodes
[
2
],
TextInputAction
.
next
,
10
focusNodes
[
2
],
TextInputAction
.
next
,
10
),
),
if
(
provider
.
tpcMobileNumberError
!=
null
)
...[
if
(
provider
.
tpcMobileNumberError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcMobileNumberError
),
errorWidget
(
context
,
provider
.
tpcMobileNumberError
),
],
],
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"ID Proof"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
),
),
child:
Center
(
),
child:
Text
(
),
"ID Proof"
,
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaMedium"
,
fontSize:
11
,
color:
AppColors
.
app_blue
,
fontWeight:
FontWeight
.
w600
,
),
),
),
),
InkResponse
(
),
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
),
),
),
],
if
(
provider
.
imagePicked
==
1
&&
errorWidget
(
context
,
provider
.
imageError
),
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
),
],
errorWidget
(
context
,
provider
.
imageError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
tpcBankNameController
,
provider
.
tpcBankNameController
,
"Bank Name"
,
"Bank Name"
,
"Enter Bank Name"
,
"Enter Bank Name"
,
provider
.
onChangetpcBankName
,
provider
.
onChangetpcBankName
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
next
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
next
),
),
if
(
provider
.
tpcBankNameError
!=
null
)
...[
if
(
provider
.
tpcBankNameError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcBankNameError
),
errorWidget
(
context
,
provider
.
tpcBankNameError
),
],
],
textControllerWidget
(
textControllerWidget
(
context
,
provider
.
tpcBankBeneficiaryNameController
,
"Bank Beneficiary Name"
,
"Enter Bank Beneficiary Name"
,
provider
.
onChangetpcBankBeneficiaryName
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
3
],
focusNodes
[
4
],
TextInputAction
.
next
),
if
(
provider
.
tpcBankBeneficiaryNameError
!=
null
)
...[
errorWidget
(
context
,
context
,
provider
.
tpcBankBeneficiaryNameError
,
provider
.
tpcBankBeneficiaryNameController
,
"Bank Beneficiary Name"
,
"Enter Bank Beneficiary Name"
,
provider
.
onChangetpcBankBeneficiaryName
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
3
],
focusNodes
[
4
],
TextInputAction
.
next
),
),
],
if
(
provider
.
tpcBankBeneficiaryNameError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcBankBeneficiaryNameError
,
),
],
textControllerWidget
(
textControllerWidget
(
context
,
provider
.
tpcBankAccountNumberController
,
"Bank Account Number"
,
"Enter Bank Account Number"
,
provider
.
onChangetpcBankAccountNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
4
],
focusNodes
[
5
],
TextInputAction
.
next
),
if
(
provider
.
tpcBankAccountNumberError
!=
null
)
...[
errorWidget
(
context
,
context
,
provider
.
tpcBankAccountNumberError
,
provider
.
tpcBankAccountNumberController
,
"Bank Account Number"
,
"Enter Bank Account Number"
,
provider
.
onChangetpcBankAccountNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
4
],
focusNodes
[
5
],
TextInputAction
.
next
),
),
],
if
(
provider
.
tpcBankAccountNumberError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcBankAccountNumberError
,
),
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
tpcBankIFSCController
,
provider
.
tpcBankIFSCController
,
"Bank IFSC"
,
"Bank IFSC"
,
"Enter Bank IFSC"
,
"Enter Bank IFSC"
,
provider
.
onChangetpcBankIFSC
,
provider
.
onChangetpcBankIFSC
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
5
],
focusNodes
[
6
],
focusNodes
[
5
],
focusNodes
[
6
],
TextInputAction
.
next
TextInputAction
.
next
),
),
if
(
provider
.
tpcBankIFSCError
!=
null
)
...[
if
(
provider
.
tpcBankIFSCError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcBankIFSCError
),
errorWidget
(
context
,
provider
.
tpcBankIFSCError
),
],
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
tpcNoteController
,
provider
.
tpcNoteController
,
"Description"
,
"Description"
,
"Enter Description"
,
"Enter Description"
,
provider
.
onChangetpcNote
,
provider
.
onChangetpcNote
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
6
],
focusNodes
[
7
],
TextInputAction
.
next
focusNodes
[
6
],
focusNodes
[
7
],
TextInputAction
.
next
),
),
if
(
provider
.
tpcNoteError
!=
null
)
...[
if
(
provider
.
tpcNoteError
!=
null
)
...[
errorWidget
(
context
,
provider
.
tpcNoteError
),
errorWidget
(
context
,
provider
.
tpcNoteError
),
],
],
InkWell
(
InkWell
(
onTap:
provider
.
submitClicked
?
null
:
()
{
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
provider
.
addTPCAgentAPIFunction
(
context
);
provider
.
addTPCAgentAPIFunction
(
context
);
},
},
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
left:
5.0
,
left:
5.0
,
right:
5.0
,
right:
5.0
,
top:
5.0
,
top:
5.0
,
bottom:
5.0
,
bottom:
5.0
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
14.0
),
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
),
child:
Center
(
child:
Center
(
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
Colors
.
white
),
valueColor:
AlwaysStoppedAnimation
(
Colors
.
white
),
):
Text
(
):
Text
(
"Submit"
,
"Submit"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
TextStyle
(
color:
Colors
.
white
),
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/order/editAdjustedOrderList.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -85,268 +87,78 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -85,268 +87,78 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
return
Consumer
<
Editpaymentprovider
>(
return
Consumer
<
Editpaymentprovider
>(
builder:
(
context
,
editProvider
,
child
)
{
builder:
(
context
,
editProvider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
child:
Scaffold
(
context
,
resizeToAvoidBottomInset:
true
,
"
${widget.pageTitleName}
"
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
editProvider
.
resetForm
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"
${widget.pageTitleName}
"
,
body:
Container
(
editProvider
.
resetForm
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
SizedBox
(
width:
0
),
// decoration: BoxDecoration(
),
// color: Colors.white,
body:
Container
(
// borderRadius: BorderRadius.circular(20),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
// ),
// decoration: BoxDecoration(
child:
SingleChildScrollView
(
// color: Colors.white,
child:
Column
(
// borderRadius: BorderRadius.circular(20),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
// ),
children:
[
child:
SingleChildScrollView
(
if
(
editProvider
.
editOrderList
!.
isNotEmpty
)
...[
child:
Column
(
InkResponse
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
onTap:
()
{
children:
[
// if (provider.selectedOrderIds.length < provider.orderList.length) {
if
(
editProvider
.
editOrderList
!.
isNotEmpty
)
...[
editProvider
.
editAddNewRow2
();
InkResponse
(
// } else {
onTap:
()
{
// ScaffoldMessenger.of(context).showSnackBar(
// if (provider.selectedOrderIds.length < provider.orderList.length) {
// SnackBar(
editProvider
.
editAddNewRow2
();
// content: Text('No more unique order IDs or statuses available'),
// } else {
// ),
// ScaffoldMessenger.of(context).showSnackBar(
// );
// SnackBar(
// }
// content: Text('No more unique order IDs or statuses available'),
},
// ),
child:
Container
(
// );
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
// }
height:
45
,
},
width:
MediaQuery
.
of
(
context
).
size
.
width
,
child:
Container
(
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
color:
Color
(
0xFFE6F6FF
),
height:
45
,
borderRadius:
BorderRadius
.
circular
(
12
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
border:
Border
.
all
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
Color
(
0xFFE6F6FF
),
width:
0.5
,
borderRadius:
BorderRadius
.
circular
(
12
),
),
border:
Border
.
all
(
),
child:
Center
(
child:
Text
(
"+ Add Order"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
),
),
child:
Center
(
),
child:
Text
(
),
"+ Add Order"
,
if
(
editProvider
.
paidList
.
length
>
0
)
...[
style:
TextStyle
(
Row
(
fontFamily:
"JakartaMedium"
,
children:
[
color:
AppColors
.
app_blue
,
Expanded
(
),
child:
ListView
.
builder
(
itemCount:
editProvider
.
paidList
.
length
,
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
3
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Order"
,
),
Row
(
children:
[
Expanded
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButton2
<
PaidList
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
editProvider
.
paidList
.
map
(
(
ord
,
)
=>
DropdownMenuItem
<
PaidList
>(
value:
ord
,
child:
Text
(
"(Order Number:
${ord.orderNumber}
) + (Order Amount:
${ord.orderAmount}
) + (Balance Amount:
${ord.balanceAmount}
)"
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
// value:
// editProvider
// .selectedPaidList,
value:
editProvider
.
paidList
.
firstWhere
(
(
product
)
=>
product
.
orderId
==
editProvider
.
selectedPaidOrderIDs
[
index
],
),
// value:editProvider.paidList.firstWhere(
// (
// ord,
// ) =>
// ord.orderId ==
// editProvider.selectedPaidOrderIDs[index],
// orElse:
// () =>
// editProvider.paidList[0],
// ),
onChanged:
(
PaidList
?
value
,
)
{
if
(
value
!=
null
)
{
if
(
editProvider
.
paidList
.
isNotEmpty
)
{
editProvider
.
selectedPaidList
=
value
;
print
(
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
);
editProvider
.
updateSelectedPaidOrderId
(
index
,
editProvider
.
selectedPaidList
,
);
// provider.selectedOrderIds = value!.orderId!;
// provider.selectedOrderNumbers = value!.orderNumber!;
// print(
// "hfjkshfg" +
// provider.selectedOrderIds.toString(),
}
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
),
],
),
],
),
),
),
],
),
SizedBox
(
width:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editOrderAmountControllers
[
index
],
"Order Amount"
,
"Enter Order Amount"
,
(
p0
)
{},
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
),
),
],
),
SizedBox
(
height:
10
),
// SizedBox(width: 10),
//
// IconButton(
// icon: Icon(Icons.delete),
// onPressed: provider.orderAmountControllers.length > 1
// ? () => provider.removeRow(index)
// : null, // Prevent removing the last row
// ),
],
),
);
},
),
),
),
),
]
,
)
,
),
),
],
if
(
editProvider
.
paidList
.
length
>
0
)
...[
if
(
editProvider
.
editOrderList
.
length
>
0
)
...[
if
(
editProvider
.
editOrderAmountControllers2
.
length
>
0
)
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
editProvider
.
editOrder
List
.
length
,
itemCount:
editProvider
.
paid
List
.
length
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
),
),
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
vertical:
10
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
...
@@ -360,8 +172,7 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -360,8 +172,7 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
CrossAxisAlignment
.
start
,
.
start
,
children:
[
children:
[
TextWidget
(
TextWidget
(
context
,
context
,
...
@@ -372,10 +183,9 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -372,10 +183,9 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
Expanded
(
Expanded
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButton2
<
child:
DropdownButton2
<
EditOrder
List
Paid
List
>(
>(
isExpanded:
isExpanded:
true
,
true
,
hint:
Text
(
hint:
Text
(
'Select Account Type'
,
'Select Account Type'
,
style:
style:
...
@@ -389,17 +199,17 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -389,17 +199,17 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
),
),
items:
items:
editProvider
editProvider
.
editOrder
List
.
paid
List
.
map
(
.
map
(
(
(
ord
,
ord
,
)
=>
DropdownMenuItem
<
)
=>
DropdownMenuItem
<
EditOrder
List
Paid
List
>(
>(
value:
value:
ord
,
ord
,
child:
Text
(
child:
Text
(
"(Order Number:
${ord.orderNumber}
) + (Order Amount:
${ord.
total
Amount}
) + (Balance Amount:
${ord.balanceAmount}
)"
??
"(Order Number:
${ord.orderNumber}
) + (Order Amount:
${ord.
order
Amount}
) + (Balance Amount:
${ord.balanceAmount}
)"
??
''
,
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
fontSize:
...
@@ -411,40 +221,46 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -411,40 +221,46 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
),
),
)
)
.
toList
(),
.
toList
(),
value:
// value:
editProvider
.
selectedOrderIDs
[
j
]
!=
// editProvider
null
&&
// .selectedPaidList,
editProvider
.
editOrderList
.
isNotEmpty
value:
editProvider
?
editProvider
.
editOrderList
.
firstWhere
(
.
paidList
(
.
firstWhere
(
ord
,
(
product
)
=>
)
=>
product
ord
.
orderId
==
.
orderId
==
editProvider
.
selectedOrderIDs
[
j
],
editProvider
orElse:
.
selectedPaidOrderIDs
[
index
],
()
=>
),
editProvider
.
editOrderList
[
0
],
// value:editProvider.paidList.firstWhere(
)
// (
:
null
,
// ord,
// ) =>
// ord.orderId ==
// editProvider.selectedPaidOrderIDs[index],
// orElse:
// () =>
// editProvider.paidList[0],
// ),
onChanged:
(
onChanged:
(
EditOrderList
?
PaidList
?
value
,
value
,
)
{
)
{
if
(
value
!=
if
(
value
!=
null
)
{
null
)
{
if
(
editProvider
if
(
editProvider
.
editOrder
List
.
paid
List
.
isNotEmpty
)
{
.
isNotEmpty
)
{
editProvider
editProvider
.
selected
Order
List
=
.
selected
Paid
List
=
value
;
value
;
print
(
print
(
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
);
);
editProvider
.
updateSelectedOrderId
(
editProvider
.
updateSelected
Paid
OrderId
(
j
,
index
,
editProvider
editProvider
.
selected
Order
List
,
.
selected
Paid
List
,
);
);
// provider.selectedOrderIds = value!.orderId!;
// provider.selectedOrderIds = value!.orderId!;
// provider.selectedOrderNumbers = value!.orderNumber!;
// provider.selectedOrderNumbers = value!.orderNumber!;
...
@@ -486,7 +302,7 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -486,7 +302,7 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
child:
textControllerWidget
(
child:
textControllerWidget
(
context
,
context
,
editProvider
editProvider
.
editOrderAmountControllers
2
[
j
],
.
editOrderAmountControllers
[
index
],
"Order Amount"
,
"Order Amount"
,
"Enter Order Amount"
,
"Enter Order Amount"
,
(
p0
)
{},
(
p0
)
{},
...
@@ -494,9 +310,9 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -494,9 +310,9 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
false
,
false
,
FilteringTextInputFormatter
FilteringTextInputFormatter
.
digitsOnly
,
.
digitsOnly
,
null
,
focusNodes
[
0
]
,
null
,
focusNodes
[
1
]
,
TextInputAction
.
do
ne
TextInputAction
.
ne
xt
),
),
),
),
],
],
...
@@ -518,56 +334,246 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
...
@@ -518,56 +334,246 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
),
),
],
],
),
),
],
if
(
editProvider
.
editOrderList
.
length
>
0
)
...[
if
(
editProvider
.
editOrderAmountControllers2
.
length
>
0
)
Row
(
children:
[
Expanded
(
child:
ListView
.
builder
(
itemCount:
editProvider
.
editOrderList
.
length
,
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
3
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Order"
,
),
Row
(
children:
[
Expanded
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButton2
<
EditOrderList
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
editProvider
.
editOrderList
.
map
(
(
ord
,
)
=>
DropdownMenuItem
<
EditOrderList
>(
value:
ord
,
child:
Text
(
"(Order Number:
${ord.orderNumber}
) + (Order Amount:
${ord.totalAmount}
) + (Balance Amount:
${ord.balanceAmount}
)"
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
editProvider
.
selectedOrderIDs
[
j
]
!=
null
&&
editProvider
.
editOrderList
.
isNotEmpty
?
editProvider
.
editOrderList
.
firstWhere
(
(
ord
,
)
=>
ord
.
orderId
==
editProvider
.
selectedOrderIDs
[
j
],
orElse:
()
=>
editProvider
.
editOrderList
[
0
],
)
:
null
,
onChanged:
(
EditOrderList
?
value
,
)
{
if
(
value
!=
null
)
{
if
(
editProvider
.
editOrderList
.
isNotEmpty
)
{
editProvider
.
selectedOrderList
=
value
;
print
(
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
);
editProvider
.
updateSelectedOrderId
(
j
,
editProvider
.
selectedOrderList
,
);
// provider.selectedOrderIds = value!.orderId!;
// provider.selectedOrderNumbers = value!.orderNumber!;
// print(
// "hfjkshfg" +
// provider.selectedOrderIds.toString(),
}
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
),
],
),
],
),
),
),
],
),
SizedBox
(
width:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editOrderAmountControllers2
[
j
],
"Order Amount"
,
"Enter Order Amount"
,
(
p0
)
{},
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
null
,
null
,
TextInputAction
.
done
),
),
],
),
SizedBox
(
height:
10
),
// SizedBox(width: 10),
//
// IconButton(
// icon: Icon(Icons.delete),
// onPressed: provider.orderAmountControllers.length > 1
// ? () => provider.removeRow(index)
// : null, // Prevent removing the last row
// ),
],
),
);
},
),
),
],
),
],
],
],
],
],
]
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
onTap:
editProvider
.
submitLoading
?
null
:
()
{
editProvider
.
submitLoading
=
true
;
final
updatedData
=
editProvider
.
getFormDataUpdate
();
print
(
updatedData
);
final
insertedData
=
editProvider
.
getFormData
();
print
(
insertedData
);
editProvider
.
editPaymentDetailsAdjustedOrdersUpdateAPIFunction
(
context
,
widget
.
values
[
"payment_id"
],
updatedData
,
insertedData
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
?
null
valueColor:
AlwaysStoppedAnimation
(
:
()
{
AppColors
.
app_blue
,
editProvider
.
submitLoading
=
true
;
),
final
updatedData
=
editProvider
.
getFormDataUpdate
();
)
print
(
updatedData
);
:
Text
(
final
insertedData
=
editProvider
.
getFormData
();
"Submit"
,
print
(
insertedData
);
style:
TextStyle
(
editProvider
fontSize:
15
,
.
editPaymentDetailsAdjustedOrdersUpdateAPIFunction
(
fontFamily:
"JakartaMedium"
,
context
,
color:
Colors
.
white
,
widget
.
values
[
"payment_id"
],
updatedData
,
insertedData
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
,
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
),
...
...
lib/screens/order/editOrderAccountDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -55,477 +57,481 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
...
@@ -55,477 +57,481 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
return
Consumer
<
Editorderprovider
>(
return
Consumer
<
Editorderprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
child:
Scaffold
(
context
,
resizeToAvoidBottomInset:
true
,
"
${widget.pageTitleName}
"
,
backgroundColor:
AppColors
.
white
,
provider
.
resetForm
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"
${widget.pageTitleName}
"
,
body:
Container
(
provider
.
resetForm
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
SizedBox
(
width:
0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
SingleChildScrollView
(
body:
Container
(
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Dispatch State"
),
TextWidget
(
context
,
"Dispatch State"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
States
>(
child:
DropdownButton2
<
States
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
"Select State"
,
"Select State"
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
dispatchStates
provider
.
dispatchStates
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
States
>(
(
e
)
=>
DropdownMenuItem
<
States
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
name
!,
e
.
name
!,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selecetdDispatchStates
,
value:
provider
.
selecetdDispatchStates
,
onChanged:
(
States
?
value
)
{
onChanged:
(
States
?
value
)
{
if
(
provider
.
dispatchStates
.
isNotEmpty
)
{
if
(
provider
.
dispatchStates
.
isNotEmpty
)
{
provider
.
selecetdDispatchStates
=
value
;
provider
.
selecetdDispatchStates
=
value
;
provider
.
selectedDispatchStateID
=
value
!.
id
!;
provider
.
selectedDispatchStateID
=
value
!.
id
!;
provider
.
selectedDispatchStateName
=
provider
.
selectedDispatchStateName
=
value
!.
name
!;
value
!.
name
!;
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
provider
.
dispatchDistricts
.
clear
();
provider
.
dispatchDistricts
.
clear
();
// provider.selectedDispatchDistricts = null;
// provider.selectedDispatchDistricts = null;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictValue
=
""
;
provider
.
selectedDispatchDistrictValue
=
""
;
}
provider
.
getDispatchDistrictAPI
(
context
,
provider
.
selectedDispatchStateID
,
);
}
}
provider
.
getDispatchDistrictAPI
(
},
context
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
provider
.
selectedDispatchStateID
,
iconStyleData:
ddtheme
.
iconStyleData
,
);
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
}
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
},
),
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
//dd
//dd
TextWidget
(
context
,
"Dispatch District"
),
TextWidget
(
context
,
"Dispatch District"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
Districts
>
(
child:
DropdownButton2
<
Districts
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
"Select District"
,
"Select District"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
dispatchDistricts
provider
.
dispatchDistricts
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
Districts
>
(
(
e
)
=>
DropdownMenuItem
<
Districts
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
district
!,
e
.
district
!,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedDispatchDistricts
,
value:
provider
.
selectedDispatchDistricts
,
onChanged:
(
Districts
?
value
)
{
onChanged:
(
Districts
?
value
)
{
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
provider
.
selectedDispatchDistricts
=
value
;
provider
.
selectedDispatchDistricts
=
value
;
provider
.
selectedDispatchDistrictId
=
provider
.
selectedDispatchDistrictId
=
value
!.
id
!;
value
!.
id
!;
provider
.
selectedDispatchDistrictValue
=
provider
.
selectedDispatchDistrictValue
=
value
!.
district
!;
value
!.
district
!;
if
(
provider
if
(
provider
.
dispatchSubLocations
.
dispatchSubLocations
.
isNotEmpty
)
{
.
isNotEmpty
)
{
provider
.
dispatchSubLocations
.
clear
();
provider
.
dispatchSubLocations
.
clear
();
// provider.selectedDispatchSubLocations =
// provider.selectedDispatchSubLocations =
// null;
// null;
provider
.
selectedDispatchSubLocID
=
null
;
provider
.
selectedDispatchSubLocID
=
null
;
provider
.
selectedDispatchSubLocValue
=
""
;
provider
.
selectedDispatchSubLocValue
=
""
;
}
provider
.
getDispatchSubLocationAPI
(
context
,
provider
.
selectedDispatchDistrictId
,
);
}
}
provider
.
getDispatchSubLocationAPI
(
},
context
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
provider
.
selectedDispatchDistrictId
,
iconStyleData:
ddtheme
.
iconStyleData
,
);
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
}
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
},
),
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
TextWidget
(
context
,
"Dispatch Sub Location"
),
TextWidget
(
context
,
"Dispatch Sub Location"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
SubLocations
>
(
child:
DropdownButton2
<
SubLocations
>
(
hint:
Text
(
hint:
Text
(
"Select Sub Locality"
,
"Select Sub Locality"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
dispatchSubLocations
provider
.
dispatchSubLocations
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
SubLocations
>
(
(
e
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
subLocality
!,
e
.
subLocality
!,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedDispatchSubLocations
,
value:
provider
.
selectedDispatch
SubLocations
,
onChanged:
(
SubLocations
?
value
)
{
onChanged:
(
SubLocations
?
value
)
{
if
(
provider
.
dispatch
SubLocations
.
isNotEmpty
)
{
if
(
provider
.
d
ispatchSubLocations
.
isNotEmpty
)
{
provider
.
selectedD
ispatchSubLocations
=
value
;
provider
.
selectedDispatchSubLoc
ations
=
value
;
provider
.
selectedDispatchSubLoc
ID
=
provider
.
selectedDispatchSubLocID
=
value
!.
id
!;
value
!.
id
!;
provider
.
selectedDispatchSubLocValue
=
provider
.
selectedDispatchS
ubLoc
V
al
ue
=
value
!.
s
ubLocal
ity
!;
value
!.
subLocality
!;
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
//dd
//dd
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
dispatchAddressController
,
provider
.
dispatchAddressController
,
"Dispatch Address"
,
"Dispatch Address"
,
"Enter Dispatch Address"
,
"Enter Dispatch Address"
,
provider
.
onChangedDispatchAddress
,
provider
.
onChangedDispatchAddress
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
),
),
errorWidget
(
context
,
provider
.
dispatchAddressError
),
errorWidget
(
context
,
provider
.
dispatchAddressError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
dispatchPincodeController
,
provider
.
dispatchPincodeController
,
"Dispatch Pin code"
,
"Dispatch Pin code"
,
"Enter Dispatch Pin code"
,
"Enter Dispatch Pin code"
,
provider
.
onChangedDispatchPincode
,
provider
.
onChangedDispatchPincode
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
1
],
focusNodes
[
2
],
TextInputAction
.
next
focusNodes
[
1
],
focusNodes
[
2
],
TextInputAction
.
next
),
),
errorWidget
(
context
,
provider
.
dispatchPincodeError
),
errorWidget
(
context
,
provider
.
dispatchPincodeError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
noteController
,
provider
.
noteController
,
"Note"
,
"Note"
,
"Enter Note"
,
"Enter Note"
,
provider
.
onChangedNote
,
provider
.
onChangedNote
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
done
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
done
),
),
errorWidget
(
context
,
provider
.
noteError
),
errorWidget
(
context
,
provider
.
noteError
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Upload Purchase Order"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
),
),
child:
Center
(
),
child:
Text
(
),
"Upload Purchase Order"
,
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaMedium"
,
fontSize:
11
,
color:
AppColors
.
app_blue
,
fontWeight:
FontWeight
.
w600
,
),
),
),
),
InkResponse
(
),
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
),
),
),
],
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
TextWidget
(
context
,
"Unloading Scope"
),
Padding
(
//dd
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Expanded
(
Text
(
child:
DropdownButton2
<
String
>(
"
${provider.imagePath}
"
,
hint:
Text
(
style:
TextStyle
(
"Select Unloading Scope"
,
color:
AppColors
.
semi_black
,
style:
const
TextStyle
(
fontSize:
14
),
fontSize:
11
,
fontWeight:
FontWeight
.
w600
,
),
),
),
items:
InkResponse
(
provider
.
unloadingScope
onTap:
()
{
.
map
(
provider
.
imagePicked
=
0
;
(
e
)
=>
DropdownMenuItem
<
String
>(
provider
.
imagePath
=
null
;
value:
e
!,
provider
.
imageFilePath
=
null
;
child:
Text
(
},
e
,
child:
SvgPicture
.
asset
(
style:
const
TextStyle
(
"assets/svg/ic_close.svg"
,
fontSize:
14
,
width:
15
,
height:
15
,
),
),
],
),
),
],
TextWidget
(
context
,
"Unloading Scope"
),
//dd
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
String
>(
hint:
Text
(
"Select Unloading Scope"
,
style:
const
TextStyle
(
fontSize:
14
),
),
items:
provider
.
unloadingScope
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
child:
Text
(
e
,
style:
const
TextStyle
(
fontSize:
14
,
),
),
),
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedUnloadingScope
,
value:
provider
.
selectedUnloadingScope
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
unloadingScope
.
isNotEmpty
)
{
if
(
provider
.
u
nloadingScope
.
isNotEmpty
)
{
provider
.
selectedU
nloadingScope
=
value
;
provider
.
selectedUnloadingScope
=
value
;
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
TextWidget
(
context
,
"Freight Scope"
),
TextWidget
(
context
,
"Freight Scope"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>
(
child:
DropdownButton2
<
String
>
(
hint:
Text
(
hint:
Text
(
"Select Freight Scope"
,
"Select Freight Scope"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
freightScope
provider
.
freightScope
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
value:
e
!,
child:
Text
(
child:
Text
(
e
,
e
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
)
.
toList
(),
value:
provider
.
selectedFreightScope
,
onChanged:
(
String
?
value
)
{
if
(
provider
.
freightScope
.
isNotEmpty
)
{
provider
.
selectedFreightScope
=
value
;
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
),
)
iconStyleData:
IconStyleData
(
.
toList
(),
icon:
SvgPicture
.
asset
(
value:
provider
.
selectedFreightScope
,
"assets/svg/arrow_dropdown.svg"
,
onChanged:
(
String
?
value
)
{
height:
25
,
if
(
provider
.
freightScope
.
isNotEmpty
)
{
width:
20
,
provider
.
selectedFreightScope
=
value
;
),
}
iconSize:
12
,
},
iconEnabledColor:
Color
(
0xFF2D2D2D
),
buttonStyleData:
ButtonStyleData
(
iconDisabledColor:
Colors
.
grey
,
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
MaterialStateProperty
.
all
<
double
>(
decoration:
BoxDecoration
(
6
,
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
he
ight:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
r
ight:
14
)
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
TextWidget
(
context
,
"Erection Scope"
),
TextWidget
(
context
,
"Erection Scope"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>
(
child:
DropdownButton2
<
String
>
(
hint:
Text
(
hint:
Text
(
"Select Erection Scope"
,
"Select Erection Scope"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
erectionScope
provider
.
erectionScope
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
value:
e
!,
child:
Text
(
child:
Text
(
e
,
e
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedErectionScope
,
value:
provider
.
selectedErectionScope
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
erectionScope
.
isNotEmpty
)
{
if
(
provider
.
e
rectionScope
.
isNotEmpty
)
{
provider
.
selectedE
rectionScope
=
value
;
provider
.
selectedErectionScope
=
value
;
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
],
],
),
),
),
),
),
),
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
ordersEditOrderAPISubmitFunction
(
context
,
widget
.
orderID
,
provider
.
selectedDispatchStateID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClicked
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
?
null
valueColor:
AlwaysStoppedAnimation
<
Color
>(
:
()
{
AppColors
.
white
,
provider
.
submitClicked
=
true
;
provider
.
ordersEditOrderAPISubmitFunction
(
context
,
widget
.
orderID
,
provider
.
selectedDispatchStateID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
)
child:
:
Text
(
provider
.
submitClicked
"Submit"
,
?
CircularProgressIndicator
.
adaptive
(
style:
TextStyle
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
fontSize:
15
,
AppColors
.
white
,
fontFamily:
"JakartaMedium"
,
),
color:
Colors
.
white
,
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
...
...
lib/screens/order/editPaymentDetailsByMode.dart
View file @
ecd8fcd1
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -85,256 +86,260 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
...
@@ -85,256 +86,260 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
return
Consumer2
<
Addpaymentprovider
,
Editpaymentprovider
>(
return
Consumer2
<
Addpaymentprovider
,
Editpaymentprovider
>(
builder:
(
context
,
provider
,
editProvider
,
child
)
{
builder:
(
context
,
provider
,
editProvider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
child:
Scaffold
(
context
,
resizeToAvoidBottomInset:
true
,
"
${widget.pageTitleName}
"
,
backgroundColor:
AppColors
.
white
,
provider
.
resetForm
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"
${widget.pageTitleName}
"
,
body:
Container
(
provider
.
resetForm
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
SizedBox
(
width:
0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
SingleChildScrollView
(
body:
Container
(
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
TextWidget
(
context
,
"Description"
),
borderRadius:
BorderRadius
.
circular
(
20
),
DropdownButtonHideUnderline
(
),
child:
Row
(
child:
SingleChildScrollView
(
children:
[
child:
Column
(
Expanded
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
DropdownButton2
<
String
>(
children:
[
isExpanded:
true
,
TextWidget
(
context
,
"Description"
),
hint:
const
Row
(
DropdownButtonHideUnderline
(
children:
[
child:
Row
(
Expanded
(
children:
[
child:
Text
(
Expanded
(
'Select Advance Payment'
,
child:
DropdownButton2
<
String
>(
style:
TextStyle
(
fontSize:
14
),
isExpanded:
true
,
overflow:
TextOverflow
.
ellipsis
,
hint:
const
Row
(
children:
[
Expanded
(
child:
Text
(
'Select Advance Payment'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
],
],
),
),
items:
items:
provider
.
description
provider
.
description
.
map
(
.
map
(
(
pm
)
=>
DropdownMenuItem
<
String
>(
(
pm
)
=>
DropdownMenuItem
<
String
>(
value:
pm
,
value:
pm
,
child:
Text
(
child:
Text
(
pm
,
pm
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedDescription
,
value:
provider
.
selectedDescription
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
provider
.
selectedDescription
=
value
;
provider
.
selectedDescription
=
value
;
print
(
print
(
"statusId:
${provider.selectedDescription}
"
,
"statusId:
${provider.selectedDescription}
"
,
);
);
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
descriptionError
),
errorWidget
(
context
,
provider
.
descriptionError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amountController
,
provider
.
amountController
,
"Amount"
,
"Amount"
,
"Enter Amount"
,
"Enter Amount"
,
provider
.
onChangeAmount
,
provider
.
onChangeAmount
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
0
],
focusNodes
[
0
],
null
,
null
,
TextInputAction
.
done
TextInputAction
.
done
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
TextWidget
(
context
,
"Select Payment Mode"
),
TextWidget
(
context
,
"Select Payment Mode"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>(
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'Select Payment Mode'
,
'Select Payment Mode'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
],
],
),
),
items:
items:
provider
.
paymentMode
provider
.
paymentMode
.
map
(
.
map
(
(
pm
)
=>
DropdownMenuItem
<
String
>(
(
pm
)
=>
DropdownMenuItem
<
String
>(
value:
pm
,
value:
pm
,
child:
Text
(
child:
Text
(
pm
,
pm
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedPaymentMode
,
value:
provider
.
selectedPaymentMode
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
if
(
valu
e
!
=
null
)
{
provider
.
selectedPaymentMod
e
=
value
;
provider
.
selectedPaymentMode
=
value
;
print
(
print
(
"statusId:
${provider.selectedPaymentMode}
"
,
"statusId:
${provider.selectedPaymentMode}
"
,
);
);
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
paymentModeError
),
errorWidget
(
context
,
provider
.
paymentModeError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
paymentRefController
,
provider
.
paymentRefController
,
"Payment Reference No."
,
"Payment Reference No."
,
"Enter Payment Reference No. / Cheque No. / UTR No."
,
"Enter Payment Reference No. / Cheque No. / UTR No."
,
provider
.
onChangepaymentRef
,
provider
.
onChangepaymentRef
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
focusNodes
[
1
],
null
,
null
,
TextInputAction
.
done
focusNodes
[
1
],
),
null
,
errorWidget
(
context
,
provider
.
paymentRefError
),
TextInputAction
.
done
TextWidget
(
context
,
"Payment Received Date"
),
),
GestureDetector
(
errorWidget
(
context
,
provider
.
paymentRefError
),
onTap:
()
{
TextWidget
(
context
,
"Payment Received Date"
),
provider
.
showDatePickerDialog
(
context
);
GestureDetector
(
},
onTap:
()
{
child:
Row
(
provider
.
showDatePickerDialog
(
context
);
crossAxisAlignment:
CrossAxisAlignment
.
center
,
},
children:
[
child:
Row
(
Expanded
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
child:
Container
(
children:
[
height:
50
,
Expanded
(
alignment:
Alignment
.
center
,
child:
Container
(
decoration:
BoxDecoration
(
height:
50
,
color:
AppColors
.
text_field_color
,
alignment:
Alignment
.
center
,
borderRadius:
BorderRadius
.
circular
(
14
),
decoration:
BoxDecoration
(
),
color:
AppColors
.
text_field_color
,
child:
Padding
(
borderRadius:
BorderRadius
.
circular
(
14
),
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
),
child:
TextFormField
(
child:
Padding
(
controller:
padding:
const
EdgeInsets
.
fromLTRB
(
provider
.
paymentReceivedDateController
,
10.0
,
keyboardType:
TextInputType
.
text
,
0.0
,
enabled:
false
,
10
,
maxLines:
1
,
0
,
readOnly:
true
,
),
onChanged:
(
value
)
{},
child:
TextFormField
(
decoration:
InputDecoration
(
controller:
hintText:
"Enter Date"
,
provider
.
paymentReceivedDateController
,
hintStyle:
TextStyle
(
keyboardType:
TextInputType
.
text
,
fontWeight:
FontWeight
.
w400
,
enabled:
false
,
color:
Color
(
0xFFB4BEC0
),
maxLines:
1
,
fontSize:
14
,
readOnly:
true
,
),
onChanged:
(
value
)
{},
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
dateError
),
errorWidget
(
context
,
provider
.
dateError
)
,
]
,
]
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
floatingActionButton:
InkResponse
(
onTap:
onTap:
editProvider
.
submitLoading
?
null
:
()
{
editProvider
.
submitLoading
=
true
;
editProvider
.
editPaymentDetailsAPIFunction
(
context
,
widget
.
values
[
"payment_id"
],
provider
.
selectedDescription
,
provider
.
selectedPaymentMode
,
provider
.
paymentRefController
.
text
,
provider
.
paymentReceivedDateController
.
text
,
provider
.
amountController
.
text
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
?
null
valueColor:
AlwaysStoppedAnimation
<
Color
>(
:
()
{
AppColors
.
white
,
editProvider
.
submitLoading
=
true
;
),
editProvider
.
editPaymentDetailsAPIFunction
(
)
context
,
:
Text
(
widget
.
values
[
"payment_id"
],
"Submit"
,
provider
.
selectedDescription
,
style:
TextStyle
(
provider
.
selectedPaymentMode
,
fontSize:
15
,
provider
.
paymentRefController
.
text
,
fontFamily:
"JakartaMedium"
,
provider
.
paymentReceivedDateController
.
text
,
color:
Colors
.
white
,
provider
.
amountController
.
text
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
),
...
...
lib/screens/order/orderDetailsFeedbackHistory.dart
View file @
ecd8fcd1
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:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -35,116 +37,120 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
...
@@ -35,116 +37,120 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Feedback History"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
feedbackHistory
.
isNotEmpty
?
Container
(
resizeToAvoidBottomInset:
true
,
child:
ListView
.
builder
(
appBar:
appbar
(
context
,
"Feedback History"
),
scrollDirection:
Axis
.
vertical
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
shrinkWrap:
true
,
body:
feedbackHistory
.
isNotEmpty
?
Container
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
ListView
.
builder
(
itemCount:
feedbackHistory
.
length
,
scrollDirection:
Axis
.
vertical
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
feedbackHistory
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
6
,
(
j
)
{
children:
List
.
generate
(
6
,
(
j
)
{
final
textheads
=
[
final
textheads
=
[
"<th>Employee</th>"
,
"<th>Employee</th>"
,
"<th>Feedback</th>"
,
"<th>Feedback</th>"
,
"<th>Attachment</th>"
,
"<th>Attachment</th>"
,
"<th>Status</th>"
,
"<th>Status</th>"
,
"<th>Date</th>"
,
"<th>Date</th>"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
"
${feedbackHistory[index].employeNaem}
"
,
"
${feedbackHistory[index].employeNaem}
"
,
"
${feedbackHistory[index].feedback}
"
,
"
${feedbackHistory[index].feedback}
"
,
"
${feedbackHistory[index].attachmentDirFilePath}
"
,
"
${feedbackHistory[index].attachmentDirFilePath}
"
,
"
${feedbackHistory[index].status}
"
,
"
${feedbackHistory[index].status}
"
,
"
${feedbackHistory[index].createdDatetime}
"
,
"
${feedbackHistory[index].createdDatetime}
"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
vertical:
6
,
horizontal:
0
,
horizontal:
0
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
),
Expanded
(
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,),
TextOverflow
.
ellipsis
,
),
style:
TextStyle
(
Expanded
(
color:
Color
(
0xFF818181
),
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
);
}
),
):
Emptywidget
(
context
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showFeedbackSheet
(
context
);
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Feedback Update"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
),
),
);
}
),
):
Emptywidget
(
context
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showFeedbackSheet
(
context
);
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Feedback Update"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
),
),
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
),
);
);
},
},
...
...
lib/screens/order/orderDetailsPaymentHistory.dart
View file @
ecd8fcd1
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:generp/Notifiers/ordersProvider/pagesDashboardProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/pagesDashboardProvider.dart'
;
...
@@ -35,93 +37,97 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
...
@@ -35,93 +37,97 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
final
paymentHistory
=
provider
.
paymentHistory
;
final
paymentHistory
=
provider
.
paymentHistory
;
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Payment History"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
paymentHistory
.
isNotEmpty
?
Container
(
resizeToAvoidBottomInset:
true
,
child:
ListView
.
builder
(
appBar:
appbar
(
context
,
"Payment History"
),
scrollDirection:
Axis
.
vertical
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
shrinkWrap:
true
,
body:
paymentHistory
.
isNotEmpty
?
Container
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
ListView
.
builder
(
itemCount:
paymentHistory
.
length
,
scrollDirection:
Axis
.
vertical
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
paymentHistory
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
7
,
(
j
)
{
children:
List
.
generate
(
7
,
(
j
)
{
final
textheads
=
[
final
textheads
=
[
"Mode of Payment"
,
"Mode of Payment"
,
"Payment Reference"
,
"Payment Reference"
,
"Payment Amount"
,
"Payment Amount"
,
"Adjusted Amount"
,
"Adjusted Amount"
,
"Entered By Employee"
,
"Entered By Employee"
,
"Payment Received Date"
,
"Payment Received Date"
,
"Action"
,
"Action"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
"
${paymentHistory[index].paymentType}
"
,
"
${paymentHistory[index].paymentType}
"
,
"
${paymentHistory[index].refNo}
"
,
"
${paymentHistory[index].refNo}
"
,
"
${paymentHistory[index].amount}
"
,
"
${paymentHistory[index].amount}
"
,
"
${paymentHistory[index].adjustedAmount}
"
,
"
${paymentHistory[index].adjustedAmount}
"
,
"
${paymentHistory[index].enteredEmployee}
"
,
"
${paymentHistory[index].enteredEmployee}
"
,
"
${paymentHistory[index].paymentDate}
"
,
"
${paymentHistory[index].paymentDate}
"
,
"
${paymentHistory[index].approvalStatus}
"
,
"
${paymentHistory[index].approvalStatus}
"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
vertical:
6
,
horizontal:
0
,
horizontal:
0
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
),
Expanded
(
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,),
TextOverflow
.
ellipsis
,
),
style:
TextStyle
(
Expanded
(
color:
Color
(
0xFF818181
),
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
);
);
}
}
),
),
):
Emptywidget
(
context
),
):
Emptywidget
(
context
),
),
),
),
);
);
},
},
...
...
lib/screens/order/orderDetailsProductsHistory.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -33,93 +35,97 @@ class _OrderdetailsproductshistoryState extends State<Orderdetailsproductshistor
...
@@ -33,93 +35,97 @@ class _OrderdetailsproductshistoryState extends State<Orderdetailsproductshistor
final
productsHistory
=
provider
.
productsHistory
;
final
productsHistory
=
provider
.
productsHistory
;
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Products"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
productsHistory
.
isNotEmpty
?
Container
(
resizeToAvoidBottomInset:
true
,
child:
ListView
.
builder
(
appBar:
appbar
(
context
,
"Products"
),
scrollDirection:
Axis
.
vertical
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
shrinkWrap:
true
,
body:
productsHistory
.
isNotEmpty
?
Container
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
ListView
.
builder
(
itemCount:
productsHistory
.
length
,
scrollDirection:
Axis
.
vertical
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
productsHistory
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
7
,
(
j
)
{
children:
List
.
generate
(
7
,
(
j
)
{
final
textheads
=
[
final
textheads
=
[
"Product Name"
,
"Product Name"
,
"Product Price"
,
"Product Price"
,
"Quantity"
,
"Quantity"
,
"CGST %"
,
"CGST %"
,
"SGST %"
,
"SGST %"
,
"IGST %"
,
"IGST %"
,
"Total Price"
,
"Total Price"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
"
${productsHistory[index].productName}
"
,
"
${productsHistory[index].productName}
"
,
"
${productsHistory[index].unitPrice}
"
,
"
${productsHistory[index].unitPrice}
"
,
"
${productsHistory[index].qty}
"
,
"
${productsHistory[index].qty}
"
,
"
${productsHistory[index].cgstPercentage}
"
,
"
${productsHistory[index].cgstPercentage}
"
,
"
${productsHistory[index].sgstPercentage}
"
,
"
${productsHistory[index].sgstPercentage}
"
,
"
${productsHistory[index].igstPercentage}
"
,
"
${productsHistory[index].igstPercentage}
"
,
"
${productsHistory[index].totalPrice}
"
,
"
${productsHistory[index].totalPrice}
"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
vertical:
6
,
horizontal:
0
,
horizontal:
0
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
),
Expanded
(
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,),
TextOverflow
.
ellipsis
,
),
style:
TextStyle
(
Expanded
(
color:
Color
(
0xFF818181
),
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
);
);
}
}
),
),
):
Emptywidget
(
context
),
):
Emptywidget
(
context
),
),
),
),
);
);
},
},
...
...
lib/screens/order/orderModuleDashboard.dart
View file @
ecd8fcd1
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'
;
...
@@ -33,100 +35,221 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -33,100 +35,221 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
final
pages
=
provider
.
ordersAccessiblePagesList
;
final
pages
=
provider
.
ordersAccessiblePagesList
;
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Orders"
),
child:
Scaffold
(
body:
Container
(
resizeToAvoidBottomInset:
true
,
child:
SingleChildScrollView
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Column
(
appBar:
appbar
(
context
,
"Orders"
),
children:
[
body:
Container
(
Container
(
child:
SingleChildScrollView
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
child:
Column
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
children:
[
decoration:
BoxDecoration
(
Container
(
color:
Colors
.
white
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
borderRadius:
BorderRadius
.
circular
(
16
)
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
itemCount:
provider
.
ordersgain
.
length
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
physics:
AlwaysScrollableScrollPhysics
(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
0.65
),
itemBuilder:
(
context
,
jndex
)
{
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
final
leadTitles
=
[
'Order Gain'
,
'Dispatched'
,
'Pending Tasks'
,
'Quote'
,
];
final
colors
=
[
0xFFE7FFE5
,
0xFFF3EDFF
,
0xFFFFFCD5
,
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFF493272
,
0xFF605C00
,
0xFF91481B
,
];
return
InkResponse
(
onTap:
()
async
{
if
(
provider
.
ordersgain
[
jndex
].
filter
!.
pageName
!=
""
)
{
if
(
provider
.
ordersgain
[
jndex
].
filter
!.
pageName
!
.
contains
(
"Order List"
))
{
// await Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) => OrderslistbyModes(
// pageTitleName:
// provider
// .ordersgain[jndex]
// .filter!
// .pageName!,
// mode:
// provider.ordersgain[jndex].filter!.mode,
// filter: provider.ordersgain[jndex].filter!,
// ),
// ),
// );
}
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
decoration:
BoxDecoration
(
color:
Color
(
colors
[
jndex
]),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
ordersgain
[
jndex
].
count
!,
style:
TextStyle
(
fontSize:
30
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
textcolors
[
jndex
]),
),
),
Text
(
leadTitles
[
jndex
],
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
),
),
);
},
),
),
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
ListView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
itemCount:
pages
.
length
,
itemCount:
provider
.
ordersgain
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
physics:
NeverScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
Widget
?
SvgIcon
;
crossAxisCount:
2
,
switch
(
pages
[
index
].
mode
)
{
crossAxisSpacing:
10
,
case
"level_one_approval"
:
mainAxisSpacing:
10
,
SvgIcon
=
SvgPicture
.
asset
(
childAspectRatio:
0.65
"assets/svg/fin_lv1.svg"
,
),
);
itemBuilder:
(
context
,
jndex
)
{
break
;
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
case
"level_two_approval"
:
final
leadTitles
=
[
case
"level_two_rejected"
:
'Order Gain'
,
SvgIcon
=
SvgPicture
.
asset
(
'Dispatched'
,
"assets/svg/fin_lv2.svg"
,
'Pending Tasks'
,
);
'Quote'
,
break
;
];
final
colors
=
[
default
:
0xFFE7FFE5
,
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
0xFFF3EDFF
,
break
;
0xFFFFFCD5
,
};
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFF493272
,
0xFF605C00
,
0xFF91481B
,
];
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
if
(
provider
.
ordersgain
[
jndex
].
filter
!.
pageName
!=
var
navigate
;
""
)
{
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
)
)
{
if
(
provider
.
ordersgain
[
jndex
].
filter
!.
pageName
!
navigate
=
AddorderScreen
(
.
contains
(
"Order List"
))
{
mode:
pages
[
index
].
mode
!,
// await Navigator.push(
pageTitleName:
// context,
pages
[
index
]
// MaterialPageRoute(
.
pageName
!,
// builder:
);
// (context) => OrderslistbyModes(
}
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Payment"
)
)
{
// pageTitleName:
(
"navigate to Add Payment"
);
// provider
navigate
=
AddpaymentScreen
(
// .ordersgain[jndex]
mode:
pages
[
index
].
mode
!,
// .filter!
pageTitleName:
// .pageName!,
pages
[
index
]
// mode:
.
pageName
!,
// provider.ordersgain[jndex].filter!.mode,
);
// filter: provider.ordersgain[jndex].filter!,
}
// ),
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Payments List"
))
{
// ),
navigate
=
Paymentlistsbymode
(
// );
mode:
pages
[
index
].
mode
!,
}
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Order List"
)){
navigate
=
OrderslistbyModes
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
==
"Add TPC Agent"
){
navigate
=
AddtpcagentScreen
();
}
else
if
(
pages
[
index
].
pageName
==
"TPC Agent List (Admin)"
){
navigate
=
Tpcagentlistbymode
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
==
"Pending TPC Issue List"
){
navigate
=
Tpcagentissuelist
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
if
(
navigate
!=
null
){
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
);
}
}
},
},
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
colors
[
jndex
])
,
color:
Color
s
.
white
,
borderRadius:
BorderRadius
.
circular
(
1
2
),
borderRadius:
BorderRadius
.
circular
(
1
4
),
),
),
child:
Column
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Text
(
Expanded
(
flex:
1
,
child:
SvgIcon
),
provider
.
ordersgain
[
jndex
].
count
!,
Expanded
(
style:
TextStyle
(
flex:
5
,
fontSize:
30
,
child:
Text
(
fontFamily:
"JakartaMedium"
,
"
${pages[index].pageName}
"
,
color:
Color
(
textcolors
[
jndex
]),
),
),
),
),
Text
(
Expanded
(
leadTitles
[
jndex
],
flex:
1
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
),
),
],
],
),
),
...
@@ -134,125 +257,8 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -134,125 +257,8 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
);
);
},
},
),
),
),
],
),
ListView
.
builder
(
itemCount:
pages
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
Widget
?
SvgIcon
;
switch
(
pages
[
index
].
mode
)
{
case
"level_one_approval"
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
,
);
break
;
case
"level_two_approval"
:
case
"level_two_rejected"
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
,
);
break
;
default
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
break
;
};
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
)
)
{
navigate
=
AddorderScreen
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Payment"
)
)
{
(
"navigate to Add Payment"
);
navigate
=
AddpaymentScreen
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Payments List"
))
{
navigate
=
Paymentlistsbymode
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Order List"
)){
navigate
=
OrderslistbyModes
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
==
"Add TPC Agent"
){
navigate
=
AddtpcagentScreen
();
}
else
if
(
pages
[
index
].
pageName
==
"TPC Agent List (Admin)"
){
navigate
=
Tpcagentlistbymode
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
==
"Pending TPC Issue List"
){
navigate
=
Tpcagentissuelist
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
);
}
if
(
navigate
!=
null
){
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
);
}
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
SvgIcon
),
Expanded
(
flex:
5
,
child:
Text
(
"
${pages[index].pageName}
"
,
),
),
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
),
],
),
),
);
},
),
],
),
),
),
),
),
),
...
...
lib/screens/order/ordersDetailsByModes.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -185,348 +187,352 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
...
@@ -185,348 +187,352 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
}
}
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
mode
!=
""
?
"Order Details"
:
"Order Details (
${widget.mode}
)"
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
InkResponse
(
context
,
onTap:
()
{
widget
.
mode
!=
""
?
"Order Details"
:
"Order Details (
${widget.mode}
)"
,
_showOptionsSheet
(
context
);
provider
.
resetAll
,
},
InkResponse
(
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
),
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
Container
(
child:
Container
(
height:
50
,
height:
50
,
width:
35
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
orderDetails
.
accountName
??
"-"
,
orderDetails
.
accountName
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${orderDetails.balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
orderDetails
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
App
Color
s
.
semi_black
,
color:
Color
(
0xFF0D9C00
)
,
),
),
),
),
Text
(
),
"₹
${orderDetails.balanceAmount}
"
,
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
Headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
Expanded
(
),
child:
InkResponse
(
),
onTap:
()
{
Expanded
(
if
(
Headings
[
j
]
==
flex:
2
,
"Purchase Order"
)
{
child:
Container
(
Navigator
.
push
(
padding:
EdgeInsets
.
symmetric
(
context
,
horizontal:
5
,
MaterialPageRoute
(
vertical:
10
,
builder:
),
(
context
)
=>
Fileviewer
(
decoration:
BoxDecoration
(
fileName:
borderRadius:
BorderRadius
.
circular
(
8
),
orderDetails
color:
Color
(
0xFFE3FFE0
),
.
tpcPaymentAttachementViewFileName
!,
),
fileUrl:
child:
Center
(
orderDetails
child:
Text
(
.
tpcPaymentAttachmentDirFilePath
!,
orderDetails
.
status
??
"-"
,
),
textAlign:
TextAlign
.
center
,
),
style:
TextStyle
(
);
fontFamily:
"JakartaMedium"
,
}
fontSize:
14
,
},
color:
Color
(
0xFF0D9C00
),
child:
Text
(
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
subHeadings
[
j
]==
""
?
"-"
:
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
Headings
[
j
]
==
"Purchase Order"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
)
,
]
,
),
),
),
);
],
}),
),
InkResponse
(
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
onTap:
()
async
{
...
List
.
generate
(
subHeadings
.
length
,
(
j
)
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
return
Container
(
},
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Container
(
child:
Row
(
padding:
EdgeInsets
.
symmetric
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
vertical:
5
,
children:
[
),
Expanded
(
child:
Row
(
child:
Text
(
crossAxisAlignment:
Headings
[
j
],
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
Headings
[
j
]
==
"Purchase Order"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
orderDetails
.
tpcPaymentAttachementViewFileName
!,
fileUrl:
orderDetails
.
tpcPaymentAttachmentDirFilePath
!,
),
),
);
}
},
child:
Text
(
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
subHeadings
[
j
]==
""
?
"-"
:
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
Headings
[
j
]
==
"Purchase Order"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
],
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
),
bottomNavigationBar:
bottomNavigationBar:
[
"self"
,
"pending_approval"
].
contains
(
widget
.
mode
)
[
"self"
,
"pending_approval"
].
contains
(
widget
.
mode
)
?
Container
(
height:
0
)
?
Container
(
height:
0
)
:
Container
(
:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
alignment:
Alignment
.
bottomCenter
,
height:
60
,
height:
60
,
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
if
([
if
([
"level_one_approval"
,
"level_one_approval"
,
"level_two_approval"
,
"level_two_approval"
,
"level_two_rejected"
,
"level_two_rejected"
,
].
contains
(
widget
.
mode
))
...[
].
contains
(
widget
.
mode
))
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
_showLevelApprovalRejectionSheet
(
_showLevelApprovalRejectionSheet
(
context
,
context
,
"Reject"
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Reject"
,
"Reject"
,
style:
TextStyle
(
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Reject"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
),
),
),
),
),
),
],
],
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
if
([
if
([
"level_one_approval"
,
"level_one_approval"
,
"level_two_approval"
,
"level_two_approval"
,
"level_two_rejected"
,
"level_two_rejected"
,
"sales_order_registered"
,
"sales_order_registered"
,
].
contains
(
widget
.
mode
))
...[
].
contains
(
widget
.
mode
))
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
// provider
// provider
// .approveRejectPaymentRequestAPIFunction(
// .approveRejectPaymentRequestAPIFunction(
// context,
// context,
// provider.requestsDetails.id,
// provider.requestsDetails.id,
// );
// );
_showLevelApprovalRejectionSheet
(
_showLevelApprovalRejectionSheet
(
context
,
context
,
"Approve"
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
"Approve"
,
style:
TextStyle
(
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
),
),
),
),
],
],
if
([
"admin"
].
contains
(
widget
.
mode
))
...[
if
([
"admin"
].
contains
(
widget
.
mode
))
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
_showLevelDeletionSheet
(
context
);
_showLevelDeletionSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Delete"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Delete"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
),
),
),
),
),
),
],
],
if
(
widget
.
mode
==
"dispatched"
)
...[
if
(
widget
.
mode
==
"dispatched"
)
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
disProvider
.
initializeForm
(
context
);
disProvider
.
initializeForm
(
context
);
disProvider
.
ordersDetailsDispatchOrderViewFunction
(
context
,
widget
.
orderId
);
disProvider
.
ordersDetailsDispatchOrderViewFunction
(
context
,
widget
.
orderId
);
_showDispatchSheet
(
context
,
"Dispatch"
);
_showDispatchSheet
(
context
,
"Dispatch"
);
},
},
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Dispatch"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Dispatch"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
),
),
),
),
),
)
,
]
,
],
],
]
,
)
,
),
),
),
),
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
...
...
lib/screens/order/ordersListByModes.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -52,266 +54,270 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -52,266 +54,270 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
provider
.
resetAll
();
provider
.
resetAll
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetAll
,
// onTap: () {
Row
(
// _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg"),
// onTap: () {
// ),
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg"),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
_showFilterSheet
(
context
);
_showFilterSheet
(
context
);
},
},
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
"assets/svg/filter_ic.svg"
,
height:
25
,
height:
25
,
),
),
),
)
,
]
,
]
,
)
,
),
),
)
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
provider
.
isLoading
provider
.
isLoading
?
Center
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
AppColors
.
app_blue
,
)
,
),
),
),
)
)
:
ordersList
.
isNotEmpty
:
ordersList
.
isNotEmpty
?
SingleChildScrollView
(
?
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
ListView
.
builder
(
ListView
.
builder
(
itemCount:
ordersList
.
length
,
itemCount:
ordersList
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
if
(
ordersList
.
isEmpty
)
{
if
(
ordersList
.
isEmpty
)
{
return
SizedBox
(
return
SizedBox
(
child:
Center
(
child:
Center
(
child:
Text
(
"No Data Available"
),
child:
Text
(
"No Data Available"
),
),
);
}
if
(
ordersList
[
index
].
orderNumber
==
"GP20252605448"
)
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
),
);
margin:
EdgeInsets
.
symmetric
(
}
horizontal:
10
,
if
(
ordersList
[
index
].
orderNumber
==
"GP20252605448"
)
vertical:
10
,
return
Container
(
),
padding:
EdgeInsets
.
symmetric
(
decoration:
BoxDecoration
(
horizontal:
10
,
color:
Colors
.
white
,
vertical:
10
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
margin:
EdgeInsets
.
symmetric
(
child:
Column
(
horizontal:
10
,
children:
[
vertical:
10
,
Row
(
),
children:
[
decoration:
BoxDecoration
(
Expanded
(
color:
Colors
.
white
,
flex:
1
,
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Container
(
),
height:
50
,
child:
Column
(
width:
35
,
children:
[
padding:
EdgeInsets
.
all
(
8.0
),
Row
(
decoration:
BoxDecoration
(
children:
[
color:
Color
(
0xFFFFF3CE
),
Expanded
(
borderRadius:
flex:
1
,
BorderRadius
.
circular
(
8
),
child:
Container
(
),
height:
50
,
child:
SvgPicture
.
asset
(
width:
35
,
"assets/svg/fin_ic.svg"
,
padding:
EdgeInsets
.
all
(
8.0
),
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
),
"assets/svg/fin_ic.svg"
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
ordersList
[
index
]
.
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${ordersList[index].balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
),
),
Expanded
(
SizedBox
(
width:
10
),
flex:
2
,
Expanded
(
child:
Container
(
flex:
4
,
padding:
EdgeInsets
.
symmetric
(
child:
SizedBox
(
horizontal:
5
,
child:
Column
(
vertical:
10
,
crossAxisAlignment:
),
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
borderRadius:
Text
(
BorderRadius
.
circular
(
8
),
ordersList
[
index
]
color:
Color
(
0xFFE3FFE0
),
.
accountName
!,
),
child:
Center
(
child:
Text
(
ordersList
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
App
Color
s
.
semi_black
,
color:
Color
(
0xFF0D9C00
)
,
),
),
),
),
Text
(
),
"₹"
),
"
${ordersList[index].balanceAmount}
"
,
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"Order Number"
,
"Entered Employee"
,
"Sales Person"
,
// "Date",
"Paid Amount"
,
"Balance Amount"
,
];
final
subHeadings
=
[
ordersList
[
index
].
orderNumber
,
ordersList
[
index
].
enteredEmpName
,
ordersList
[
index
].
salesPersonEmpName
,
// ordersList[index].createdDatetime,
ordersList
[
index
].
paidAmount
,
ordersList
[
index
].
balanceAmount
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
Expanded
(
),
child:
InkResponse
(
),
child:
Text
(
Expanded
(
subHeadings
[
j
]!,
flex:
2
,
style:
TextStyle
(
child:
Container
(
fontSize:
14
,
padding:
EdgeInsets
.
symmetric
(
color:
Color
(
0xFF818181
),
horizontal:
5
,
decoration:
vertical:
10
,
TextDecoration
.
none
,
),
decorationColor:
decoration:
BoxDecoration
(
AppColors
.
white
,
borderRadius:
),
BorderRadius
.
circular
(
8
),
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
ordersList
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
index
]
.
orderId
,
mode:
widget
.
mode
,
),
),
),
);
if
(
res
==
true
){
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
),
),
child:
Row
(
],
crossAxisAlignment:
),
CrossAxisAlignment
.
center
,
Divider
(
mainAxisAlignment:
thickness:
0.5
,
MainAxisAlignment
.
start
,
color:
Color
(
0xFFD7D7D7
),
children:
[
),
Text
(
...
List
.
generate
(
5
,
(
j
)
{
"View Details"
,
final
headings
=
[
"Order Number"
,
"Entered Employee"
,
"Sales Person"
,
// "Date",
"Paid Amount"
,
"Balance Amount"
,
];
final
subHeadings
=
[
ordersList
[
index
].
orderNumber
,
ordersList
[
index
].
enteredEmpName
,
ordersList
[
index
].
salesPersonEmpName
,
// ordersList[index].createdDatetime,
ordersList
[
index
].
paidAmount
,
ordersList
[
index
].
balanceAmount
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
SizedBox
(
width:
5
),
Expanded
(
SvgPicture
.
asset
(
child:
InkResponse
(
"assets/svg/next_button.svg"
,
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
),
),
],
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
index
]
.
orderId
,
mode:
widget
.
mode
,
),
),
),
);
if
(
res
==
true
){
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
)
,
]
,
]
,
)
,
)
,
)
)
:
Emptywidget
(
context
),
:
Emptywidget
(
context
),
),
),
),
);
);
},
},
...
...
lib/screens/order/paymentDetailsByMode.dart
View file @
ecd8fcd1
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:generp/Notifiers/ordersProvider/paymentsProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/paymentsProvider.dart'
;
...
@@ -48,304 +50,177 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
...
@@ -48,304 +50,177 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
var
paymentDetails
=
provider
.
paymentDetails
;
var
paymentDetails
=
provider
.
paymentDetails
;
var
adjustList
=
provider
.
paidLists
;
var
adjustList
=
provider
.
paidLists
;
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
paymentDetails
.
status
==
"Registered"
context
,
?
InkResponse
(
widget
.
pageTitleName
,
onTap:
()
{
provider
.
resetAll
,
_showOptionsSheet
(
context
);
paymentDetails
.
status
==
"Registered"
},
?
InkResponse
(
child:
SvgPicture
.
asset
(
onTap:
()
{
"assets/svg/ic_more.svg"
,
_showOptionsSheet
(
context
);
height:
30
,
},
),
child:
SvgPicture
.
asset
(
)
"assets/svg/ic_more.svg"
,
:
SizedBox
(
width:
0
),
height:
30
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
children:
[
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
),
child:
Column
(
)
children:
[
:
SizedBox
(
width:
0
),
Row
(
),
children:
[
backgroundColor:
AppColors
.
scaffold_bg_color
,
Expanded
(
body:
Container
(
flex:
1
,
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
height:
50
,
children:
[
width:
35
,
Container
(
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
margin:
EdgeInsets
.
symmetric
(
child:
SvgPicture
.
asset
(
vertical:
10
,
"assets/svg/fin_ic.svg"
,
horizontal:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
c
rossAxisAlignment
:
C
rossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
paymentDetails
.
accountName
??
"-"
,
paymentDetails
.
accountName
??
"-"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"₹
${paymentDetails.amount}
"
,
"₹
${paymentDetails.amount}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
)
,
),
),
),
],
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
paymentDetails
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
Expanded
(
],
flex:
2
,
),
child:
Container
(
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
padding:
EdgeInsets
.
symmetric
(
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
horizontal:
5
,
return
Container
(
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
decoration:
BoxDecoration
(
Expanded
(
borderRadius:
BorderRadius
.
circular
(
8
),
child:
InkResponse
(
color:
Color
(
0xFFE3FFE0
),
onTap:
()
{
),
if
(
provider
.
Headings
[
j
]
==
child:
Center
(
"Attachment"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
paymentDetails
.
attachmentViewFileName
!,
fileUrl:
paymentDetails
.
attachmentDirFilePath
!,
),
),
);
}
},
child:
Text
(
child:
Text
(
provider
.
Headings
[
j
]
==
"Attachment"
paymentDetails
.
status
??
"-"
,
?
"View"
textAlign:
TextAlign
.
center
,
:
"
${provider.subHeadings[j]}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
Color
(
0xFF0D9C00
),
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"Attachment"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
),
],
),
);
}),
],
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
),
child:
Text
(
"Adjusted Order List"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemCount:
adjustList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
return
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
7
,
(
j
)
{
final
textheads
=
[
"Order Number"
,
"Order Amount"
,
"Paid Amount"
,
"Balance Amount"
,
"Adjusted Amount"
,
"DateTime"
,
"Actions"
,
];
final
textSubheads
=
[
"
${adjustList[index].orderNumber}
"
,
"
${adjustList[index].totalAmount}
"
,
"
${adjustList[index].paidAmount}
"
,
"
${adjustList[index].balanceAmount}
"
,
"
${adjustList[index].adjustedAmount}
"
,
"
${adjustList[index].datetime}
"
,
"View"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
textheads
[
j
].
toString
(),
provider
.
Headings
[
j
],
maxLines:
2
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
if
(
textheads
[
j
]
==
"Actions"
)
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
(
context
)
=>
Fileviewer
(
context
,
fileName:
)
=>
Ordersdetailsbymodes
(
paymentDetails
pageTitleName:
.
attachmentViewFileName
!,
"CRM Order Details"
,
fileUrl:
mode:
widget
.
mode
,
paymentDetails
orderId:
.
attachmentDirFilePath
!,
adjustList
[
index
].
id
,
),
),
),
),
);
);
}
}
},
},
child:
SizedBox
(
child:
Text
(
// height:45,
provider
.
Headings
[
j
]
==
"Attachment"
width:
?
"View"
MediaQuery
.
of
(
:
"
${provider.subHeadings[j]}
"
,
context
,
style:
TextStyle
(
).
size
.
width
*
fontSize:
14
,
0.75
,
color:
child:
Text
(
provider
.
Headings
[
j
]
==
textSubheads
[
j
],
"Attachment"
maxLines:
2
,
?
AppColors
.
app_blue
overflow:
TextOverflow
.
ellipsis
,
:
Color
(
0xFF818181
),
style:
TextStyle
(
decoration:
color:
provider
.
Headings
[
j
]
==
textheads
[
j
]
==
"Actions"
"Attachment"
?
AppColors
.
app_blue
?
TextDecoration
.
underline
:
Color
(
0xFF818181
),
:
TextDecoration
.
none
,
decoration:
decorationColor:
textheads
[
j
]
==
"Actions"
provider
.
Headings
[
j
]
==
?
TextDecoration
.
underline
"Attachment"
:
TextDecoration
.
none
,
?
AppColors
.
app_blue
decorationColor:
:
AppColors
.
white
,
textheads
[
j
]
==
"Actions"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
...
@@ -354,124 +229,255 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
...
@@ -354,124 +229,255 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
),
),
);
);
}),
}),
],
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
),
child:
Text
(
"Adjusted Order List"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
);
),
},
),
),
ListView
.
builder
(
],
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemCount:
adjustList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
return
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
7
,
(
j
)
{
final
textheads
=
[
"Order Number"
,
"Order Amount"
,
"Paid Amount"
,
"Balance Amount"
,
"Adjusted Amount"
,
"DateTime"
,
"Actions"
,
];
final
textSubheads
=
[
"
${adjustList[index].orderNumber}
"
,
"
${adjustList[index].totalAmount}
"
,
"
${adjustList[index].paidAmount}
"
,
"
${adjustList[index].balanceAmount}
"
,
"
${adjustList[index].adjustedAmount}
"
,
"
${adjustList[index].datetime}
"
,
"View"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
textheads
[
j
]
==
"Actions"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Ordersdetailsbymodes
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
adjustList
[
index
].
id
,
),
),
);
}
},
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
textheads
[
j
]
==
"Actions"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
textheads
[
j
]
==
"Actions"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
textheads
[
j
]
==
"Actions"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
],
),
);
}),
),
);
},
),
],
),
),
),
),
),
),
bottomNavigationBar:
bottomNavigationBar:
widget
.
mode
==
"self"
widget
.
mode
==
"self"
?
Container
(
height:
0
)
?
Container
(
height:
0
)
:
Container
(
:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
alignment:
Alignment
.
bottomCenter
,
height:
60
,
height:
60
,
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
if
(![
"self"
,
"admin"
].
contains
(
widget
.
mode
))
...[
if
(![
"self"
,
"admin"
].
contains
(
widget
.
mode
))
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
_showLevelApprovalRejectionSheet
(
_showLevelApprovalRejectionSheet
(
context
,
context
,
"Reject"
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Reject"
,
"Reject"
,
style:
TextStyle
(
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Reject"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
// provider
// provider
// .approveRejectPaymentRequestAPIFunction(
// .approveRejectPaymentRequestAPIFunction(
// context,
// context,
// provider.requestsDetails.id,
// provider.requestsDetails.id,
// );
// );
_showLevelApprovalRejectionSheet
(
_showLevelApprovalRejectionSheet
(
context
,
context
,
"Approve"
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
"Approve"
,
style:
TextStyle
(
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
),
),
),
),
]
else
if
(
widget
.
mode
==
"admin"
)
...[
]
else
if
(
widget
.
mode
==
"admin"
)
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
_showLevelDeletionSheet
(
context
);
_showLevelDeletionSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Delete"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Delete"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
),
),
),
),
),
)
,
]
,
],
],
]
,
)
,
),
),
),
),
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
...
...
lib/screens/order/paymentListsByMode.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -48,245 +50,249 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
...
@@ -48,245 +50,249 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
provider
.
resetAll
();
provider
.
resetAll
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetAll
,
// onTap: () {
Row
(
// _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// onTap: () {
// ),
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
_showFilterSheet
(
context
);
_showFilterSheet
(
context
);
},
},
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
"assets/svg/filter_ic.svg"
,
height:
25
,),
),
),
],
],
),
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
provider
.
isLoading
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
AppColors
.
app_blue
)
))
))
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
ListView
.
builder
(
ListView
.
builder
(
itemCount:
paymentLists
.
length
,
itemCount:
paymentLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
if
(
paymentLists
.
isEmpty
)
{
if
(
paymentLists
.
isEmpty
)
{
return
SizedBox
(
return
SizedBox
(
child:
Center
(
child:
Center
(
child:
Text
(
"No Data Available"
),
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
),
);
margin:
EdgeInsets
.
symmetric
(
}
horizontal:
10
,
return
Container
(
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
decoration:
BoxDecoration
(
vertical:
10
,
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
child:
Column
(
vertical:
10
,
children:
[
),
Row
(
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
Expanded
(
borderRadius:
BorderRadius
.
circular
(
16
),
flex:
1
,
),
child:
Container
(
child:
Column
(
height:
50
,
children:
[
width:
35
,
Row
(
padding:
EdgeInsets
.
all
(
8.0
),
children:
[
decoration:
BoxDecoration
(
Expanded
(
color:
Color
(
0xFFFFF3CE
),
flex:
1
,
borderRadius:
child:
Container
(
BorderRadius
.
circular
(
8
),
height:
50
,
),
width:
35
,
child:
SvgPicture
.
asset
(
padding:
EdgeInsets
.
all
(
8.0
),
"assets/svg/fin_ic.svg"
,
decoration:
BoxDecoration
(
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
),
"assets/svg/fin_ic.svg"
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
paymentLists
[
index
].
ename
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${paymentLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
),
),
Expanded
(
SizedBox
(
width:
10
),
flex:
2
,
Expanded
(
child:
Container
(
flex:
4
,
padding:
EdgeInsets
.
symmetric
(
child:
SizedBox
(
horizontal:
5
,
child:
Column
(
vertical:
10
,
crossAxisAlignment:
),
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
borderRadius:
Text
(
BorderRadius
.
circular
(
8
),
paymentLists
[
index
].
ename
!,
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
paymentLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
Color
(
0xFF0D9C00
),
AppColors
.
semi_black
,
),
),
),
),
Text
(
),
"₹"
),
"
${paymentLists[index].amount}
"
,
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Customer Name"
,
"Order Number"
,
"Date"
,
"Description"
,
];
final
subHeadings
=
[
paymentLists
[
index
].
aname
,
paymentLists
[
index
].
orderNumber
,
paymentLists
[
index
].
datetime
,
paymentLists
[
index
].
description
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
Expanded
(
),
child:
InkResponse
(
),
Expanded
(
child:
Text
(
flex:
2
,
"
${subHeadings[j]}
"
,
child:
Container
(
style:
TextStyle
(
padding:
EdgeInsets
.
symmetric
(
fontSize:
14
,
horizontal:
5
,
color:
Color
(
vertical:
10
,
0xFF818181
,
),
),
decoration:
BoxDecoration
(
decoration:
TextDecoration
borderRadius:
.
none
,
BorderRadius
.
circular
(
8
),
decorationColor:
AppColors
.
white
,
color:
Color
(
0xFFE3FFE0
),
),
),
),
child:
Center
(
child:
Text
(
paymentLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
)
,
]
,
),
),
),
);
],
}),
),
InkResponse
(
Divider
(
onTap:
()
async
{
thickness:
0.5
,
Navigator
.
push
(
context
,
MaterialPageRoute
(
color:
Color
(
0xFFD7D7D7
),
builder:
(
context
)
=>
),
Paymentdetailsbymode
(
mode:
widget
.
mode
,
...
List
.
generate
(
4
,
(
j
)
{
pageTitleName:
widget
.
pageTitleName
,
final
headings
=
[
paymentId:
paymentLists
[
index
].
paymentId
,
"Customer Name"
,
),));
"Order Number"
,
},
"Date"
,
child:
Container
(
"Description"
,
padding:
EdgeInsets
.
symmetric
(
];
vertical:
5
,
),
final
subHeadings
=
[
child:
Row
(
paymentLists
[
index
].
aname
,
crossAxisAlignment:
paymentLists
[
index
].
orderNumber
,
CrossAxisAlignment
.
center
,
paymentLists
[
index
].
datetime
,
mainAxisAlignment:
paymentLists
[
index
].
description
,
MainAxisAlignment
.
start
,
];
children:
[
return
Container
(
Text
(
padding:
EdgeInsets
.
symmetric
(
"View Details"
,
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
SizedBox
(
width:
5
),
Expanded
(
SvgPicture
.
asset
(
child:
InkResponse
(
"assets/svg/next_button.svg"
,
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
SizedBox
(
width:
5
),
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
)
,
]
,
]
,
)
,
),
)
:
Emptywidget
(
context
)
,
)
:
Emptywidget
(
context
)
,
),
),
),
);
);
},
},
...
...
lib/screens/order/tpcAgentDetailsByMode.dart
View file @
ecd8fcd1
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:generp/Notifiers/ordersProvider/tpcAgentsProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/tpcAgentsProvider.dart'
;
...
@@ -41,255 +43,259 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
...
@@ -41,255 +43,259 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
var
tpcAgentDetails
=
provider
.
TPCAgentsDetails
;
var
tpcAgentDetails
=
provider
.
TPCAgentsDetails
;
var
tpcReqAmt
=
provider
.
TPCRequestedAmounts
;
var
tpcReqAmt
=
provider
.
TPCRequestedAmounts
;
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
bottom:
Platform
.
isIOS
?
false
:
true
,
SizedBox
(
width:
0
,),),
child:
Scaffold
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
resizeToAvoidBottomInset:
true
,
body:
Container
(
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
child:
SingleChildScrollView
(
SizedBox
(
width:
0
,),),
child:
Column
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
children:
[
body:
Container
(
Container
(
child:
SingleChildScrollView
(
decoration:
BoxDecoration
(
child:
Column
(
color:
Colors
.
white
,
children:
[
borderRadius:
BorderRadius
.
circular
(
16
),
Container
(
),
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
color:
Colors
.
white
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Column
(
),
children:
[
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
Row
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
children:
[
child:
Column
(
Expanded
(
children:
[
flex:
1
,
Row
(
child:
Container
(
children:
[
height:
50
,
Expanded
(
width:
35
,
flex:
1
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
Container
(
decoration:
BoxDecoration
(
height:
50
,
color:
Color
(
0xFFFFF3CE
),
width:
35
,
borderRadius:
BorderRadius
.
circular
(
8
),
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Text
(
Text
(
tpcAgentDetails
.
name
??
"-"
,
tpcAgentDetails
.
name
??
"-"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"
${tpcAgentDetails.mobileNumber}
"
,
"
${tpcAgentDetails.mobileNumber}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
"ID Proof"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
tpcAgentDetails
.
idProofViewFileName
!,
fileUrl:
tpcAgentDetails
.
idProofDirFilePath
!,
),
),
);
}
},
child:
Text
(
child:
Text
(
"
${
provider.
sub
Headings[j]
}
"
,
provider
.
Headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
provider
.
Headings
[
j
]
==
"ID Proof"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"ID Proof"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"ID Proof"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
Expanded
(
],
child:
InkResponse
(
),
onTap:
()
{
);
if
(
provider
.
Headings
[
j
]
==
}),
"ID Proof"
)
{
],
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
tpcAgentDetails
.
idProofViewFileName
!,
fileUrl:
tpcAgentDetails
.
idProofDirFilePath
!,
),
),
);
}
},
child:
Text
(
"
${provider.subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
provider
.
Headings
[
j
]
==
"ID Proof"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"ID Proof"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"ID Proof"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
],
),
),
),
),
Container
(
Container
(
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
),
child:
Text
(
"TPC Amounts Requested"
,
child:
Text
(
"TPC Amounts Requested"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_thick
color:
AppColors
.
grey_thick
),)),
),)),
ListView
.
builder
(
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemCount:
tpcReqAmt
.
length
,
itemCount:
tpcReqAmt
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
6
,
(
j
)
{
children:
List
.
generate
(
6
,
(
j
)
{
final
textheads
=
[
final
textheads
=
[
"Customer Name"
,
"Customer Name"
,
"Order Number"
,
"Order Number"
,
"Order Amount"
,
"Order Amount"
,
"Level 2 Approved Amount"
,
"Level 2 Approved Amount"
,
"Status"
,
"Status"
,
"Action"
,
"Action"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
"
${tpcReqAmt[index].customerName}
"
,
"
${tpcReqAmt[index].customerName}
"
,
"
${tpcReqAmt[index].orderNumber}
"
,
"
${tpcReqAmt[index].orderNumber}
"
,
"
${tpcReqAmt[index].totalAmount}
"
,
"
${tpcReqAmt[index].totalAmount}
"
,
"
${tpcReqAmt[index].level2TpcApprovedAmount}
"
,
"
${tpcReqAmt[index].level2TpcApprovedAmount}
"
,
"
${tpcReqAmt[index].tpcStatus}
"
,
"
${tpcReqAmt[index].tpcStatus}
"
,
"View"
,
"View"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
vertical:
6
,
horizontal:
0
,
horizontal:
0
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
overflow:
TextOverflow
.
ellipsis
,),
),
),
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
if
(
textheads
[
j
]
==
"Action"
)
{
if
(
textheads
[
j
]
==
"Action"
)
{
Navigator
.
push
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcReqAmt
[
index
].
orderId
,
),
),
);
}
},
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
context
,
MaterialPageRoute
(
).
size
.
width
*
builder:
0.75
,
(
context
)
=>
child:
Text
(
Ordersdetailsbymodes
(
textSubheads
[
j
],
pageTitleName:
"CRM Order Details"
,
maxLines:
2
,
mode:
widget
.
mode
,
overflow:
orderId:
tpcReqAmt
[
index
].
orderId
,
TextOverflow
.
ellipsis
,
),
style:
TextStyle
(
color:
textheads
[
j
]
==
"Action"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
textheads
[
j
]
==
"Action"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
textheads
[
j
]
==
"Action"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
);
}
},
child:
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
textheads
[
j
]
==
"Action"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
textheads
[
j
]
==
"Action"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
textheads
[
j
]
==
"Action"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
);
);
}
}
),
),
],
],
),
),
),
),
),
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
...
...
lib/screens/order/tpcAgentIssueList.dart
View file @
ecd8fcd1
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:generp/screens/order/tpcAgentIssueListDetails.dart'
;
import
'package:generp/screens/order/tpcAgentIssueListDetails.dart'
;
...
@@ -43,223 +45,227 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
...
@@ -43,223 +45,227 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
provider
.
resetAll
();
provider
.
resetAll
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetAll
,
// onTap: () {
Row
(
// // _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// onTap: () {
// ),
// // _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
],
),
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
provider
.
isLoading
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
AppColors
.
app_blue
)
))
))
:
tpcAgentsIssueList
.
isNotEmpty
?
SingleChildScrollView
(
:
tpcAgentsIssueList
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
ListView
.
builder
(
ListView
.
builder
(
itemCount:
tpcAgentsIssueList
.
length
,
itemCount:
tpcAgentsIssueList
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
if
(
tpcAgentsIssueList
.
isEmpty
)
{
if
(
tpcAgentsIssueList
.
isEmpty
)
{
return
SizedBox
(
return
SizedBox
(
child:
Center
(
child:
Center
(
child:
Text
(
"No Data Available"
),
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
),
);
margin:
EdgeInsets
.
symmetric
(
}
horizontal:
10
,
return
Container
(
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
decoration:
BoxDecoration
(
vertical:
10
,
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
child:
Column
(
vertical:
10
,
children:
[
),
Row
(
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
Expanded
(
borderRadius:
BorderRadius
.
circular
(
16
),
flex:
1
,
),
child:
Container
(
child:
Column
(
height:
50
,
children:
[
width:
35
,
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFEAF7FF
),
color:
Color
(
0xFFEAF7FF
),
borderRadius:
borderRadius:
BorderRadius
.
circular
(
8
),
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/tpc_ic.svg"
,
"assets/svg/tpc_ic.svg"
,
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
c
rossAxisAlignment
:
C
rossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
tpcAgentsIssueList
[
index
].
name
!,
tpcAgentsIssueList
[
index
].
name
!,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"
${tpcAgentsIssueList[index].aname}
"
,
"
${tpcAgentsIssueList[index].aname}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
Divider
(
Divider
(
thickness:
0.5
,
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
color:
Color
(
0xFFD7D7D7
),
),
),
...
List
.
generate
(
4
,
(
j
)
{
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
final
headings
=
[
"Sales Person"
,
"Sales Person"
,
"Order Number"
,
"Order Number"
,
"Order Amount"
,
"Order Amount"
,
"Order Status"
,
"Order Status"
,
];
];
final
subHeadings
=
[
tpcAgentsIssueList
[
index
].
ename
,
tpcAgentsIssueList
[
index
].
orderNumber
,
tpcAgentsIssueList
[
index
].
totalAmount
,
tpcAgentsIssueList
[
index
].
status
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
final
subHeadings
=
[
tpcAgentsIssueList
[
index
].
ename
,
tpcAgentsIssueList
[
index
].
orderNumber
,
tpcAgentsIssueList
[
index
].
totalAmount
,
tpcAgentsIssueList
[
index
].
status
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
child:
Text
(
"
${subH
eadings[j]
}
"
,
h
eadings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
Color
(
color:
AppColors
.
semi_black
,
0xFF818181
,
),
),
),
Expanded
(
child:
InkResponse
(
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
),
),
),
),
],
],
),
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
),
),
);
);
},
}),
child:
Container
(
InkResponse
(
padding:
EdgeInsets
.
symmetric
(
onTap:
()
async
{
vertical:
5
,
Navigator
.
push
(
),
context
,
child:
Row
(
MaterialPageRoute
(
crossAxisAlignment:
builder:
CrossAxisAlignment
.
center
,
(
context
)
=>
mainAxisAlignment:
Tpcagentissuelistdetails
(
MainAxisAlignment
.
start
,
pageTitleName:
"CRM Order Details"
,
children:
[
mode:
widget
.
mode
,
Text
(
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
"View Details"
,
),
style:
TextStyle
(
),
fontFamily:
"JakartaMedium"
,
);
fontSize:
14
,
},
color:
AppColors
.
app_blue
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
"assets/svg/next_button.svg"
,
)
,
)
,
]
,
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
)
,
]
,
]
,
)
,
),
)
:
Emptywidget
(
context
)
,
)
:
Emptywidget
(
context
)
,
),
),
),
);
);
},
},
...
...
lib/screens/order/tpcAgentIssueListDetails.dart
View file @
ecd8fcd1
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:generp/screens/screensExports.dart'
;
import
'package:generp/screens/screensExports.dart'
;
...
@@ -172,248 +174,252 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
...
@@ -172,248 +174,252 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
}
}
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
bottom:
Platform
.
isIOS
?
false
:
true
,
InkResponse
(
child:
Scaffold
(
onTap:
()
{
resizeToAvoidBottomInset:
true
,
_showOptionsSheet
(
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
context
InkResponse
(
);
onTap:
()
{
},
_showOptionsSheet
(
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,),
context
),),
);
backgroundColor:
AppColors
.
scaffold_bg_color
,
},
body:
Container
(
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,),
child:
SingleChildScrollView
(
),),
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
decoration:
BoxDecoration
(
body:
Container
(
color:
Colors
.
white
,
child:
SingleChildScrollView
(
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Container
(
),
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
color:
Colors
.
white
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Column
(
),
children:
[
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
Row
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
children:
[
child:
Column
(
Expanded
(
children:
[
flex:
1
,
Row
(
child:
Container
(
children:
[
height:
50
,
Expanded
(
width:
35
,
flex:
1
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
Container
(
decoration:
BoxDecoration
(
height:
50
,
color:
Color
(
0xFFFFF3CE
),
width:
35
,
borderRadius:
BorderRadius
.
circular
(
8
),
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
orderDetails
.
accountName
??
"-"
,
orderDetails
.
accountName
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${orderDetails.balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
orderDetails
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
App
Color
s
.
semi_black
,
color:
Color
(
0xFF0D9C00
)
,
),
),
),
),
Text
(
),
"₹
${orderDetails.balanceAmount}
"
,
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
Headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
Expanded
(
),
child:
InkResponse
(
),
onTap:
()
{
Expanded
(
if
(
Headings
[
j
]
==
flex:
2
,
"Purchase Order"
)
{
child:
Container
(
Navigator
.
push
(
padding:
EdgeInsets
.
symmetric
(
context
,
horizontal:
5
,
MaterialPageRoute
(
vertical:
10
,
builder:
),
(
context
)
=>
decoration:
BoxDecoration
(
Fileviewer
(
borderRadius:
BorderRadius
.
circular
(
8
),
fileName:
color:
Color
(
0xFFE3FFE0
),
orderDetails
),
.
tpcPaymentAttachementViewFileName
!,
child:
Center
(
fileUrl:
child:
Text
(
orderDetails
orderDetails
.
status
??
"-"
,
.
tpcPaymentAttachmentDirFilePath
!,
textAlign:
TextAlign
.
center
,
),
style:
TextStyle
(
),
fontFamily:
"JakartaMedium"
,
);
fontSize:
14
,
}
color:
Color
(
0xFF0D9C00
),
},
child:
Text
(
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
Headings
[
j
]
==
"Purchase Order"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
)
,
]
,
),
),
),
);
],
}),
),
InkResponse
(
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
onTap:
()
async
{
...
List
.
generate
(
subHeadings
.
length
,
(
j
)
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
return
Container
(
},
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Container
(
child:
Row
(
padding:
EdgeInsets
.
symmetric
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
vertical:
5
,
children:
[
),
Expanded
(
child:
Row
(
child:
Text
(
crossAxisAlignment:
Headings
[
j
],
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
Headings
[
j
]
==
"Purchase Order"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
orderDetails
.
tpcPaymentAttachementViewFileName
!,
fileUrl:
orderDetails
.
tpcPaymentAttachmentDirFilePath
!,
),
),
);
}
},
child:
Text
(
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
Headings
[
j
]
==
"Purchase Order"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
],
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
),
bottomNavigationBar:
bottomNavigationBar:
Container
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
alignment:
Alignment
.
bottomCenter
,
height:
60
,
height:
60
,
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
// provider
// provider
// .approveRejectPaymentRequestAPIFunction(
// .approveRejectPaymentRequestAPIFunction(
// context,
// context,
// provider.requestsDetails.id,
// provider.requestsDetails.id,
// );
// );
_showLevelApprovalSheet
(
_showLevelApprovalSheet
(
context
);
context
);
},
},
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
),
),
),
),
],
],
),
),
),
),
),
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
...
...
lib/screens/order/tpcAgentListByMode.dart
View file @
ecd8fcd1
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:generp/Notifiers/ordersProvider/tpcAgentsProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/tpcAgentsProvider.dart'
;
...
@@ -45,249 +47,253 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
...
@@ -45,249 +47,253 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
provider
.
resetAll
();
provider
.
resetAll
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetAll
,
// onTap: () {
Row
(
// // _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// onTap: () {
// ),
// // _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
],
),
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
provider
.
isLoading
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
AppColors
.
app_blue
)
))
))
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
ListView
.
builder
(
ListView
.
builder
(
itemCount:
tpcAgentsLists
.
length
,
itemCount:
tpcAgentsLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
if
(
tpcAgentsLists
.
isEmpty
)
{
if
(
tpcAgentsLists
.
isEmpty
)
{
return
SizedBox
(
return
SizedBox
(
child:
Center
(
child:
Center
(
child:
Text
(
"No Data Available"
),
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
),
);
margin:
EdgeInsets
.
symmetric
(
}
horizontal:
10
,
return
Container
(
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
decoration:
BoxDecoration
(
vertical:
10
,
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
child:
Column
(
vertical:
10
,
children:
[
),
Row
(
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
Expanded
(
borderRadius:
BorderRadius
.
circular
(
16
),
flex:
1
,
),
child:
Container
(
child:
Column
(
height:
50
,
children:
[
width:
35
,
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFEAF7FF
),
color:
Color
(
0xFFEAF7FF
),
borderRadius:
borderRadius:
BorderRadius
.
circular
(
8
),
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/tpc_ic.svg"
,
"assets/svg/tpc_ic.svg"
,
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
c
rossAxisAlignment
:
C
rossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
tpcAgentsLists
[
index
].
name
!,
tpcAgentsLists
[
index
].
name
!,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"
${tpcAgentsLists[index]
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
.mobileNumber}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
Divider
(
Divider
(
thickness:
0.5
,
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
color:
Color
(
0xFFD7D7D7
),
),
),
...
List
.
generate
(
4
,
(
j
)
{
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
final
headings
=
[
"Entered Employee"
,
"Entered Employee"
,
"Issued Amount"
,
"Issued Amount"
,
"ID Proof"
,
"ID Proof"
,
"Description"
,
"Description"
,
];
];
final
subHeadings
=
[
final
subHeadings
=
[
tpcAgentsLists
[
index
].
enteredEmpName
,
tpcAgentsLists
[
index
].
enteredEmpName
,
tpcAgentsLists
[
index
].
issuedAmount
,
tpcAgentsLists
[
index
].
issuedAmount
,
"View"
,
"View"
,
tpcAgentsLists
[
index
].
note
,
tpcAgentsLists
[
index
].
note
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
vertical:
5
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
if
(
subHeadings
[
j
]
==
"View"
)...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
Text
(
onTap:
()
{
headings
[
j
],
Navigator
.
push
(
context
,
style:
TextStyle
(
MaterialPageRoute
(
fontFamily:
"JakartaMedium"
,
builder:
(
context
)
=>
fontSize:
14
,
Fileviewer
(
color:
AppColors
.
semi_black
,
fileName:
tpcAgentsLists
[
index
]
.
idProofViewFileName
??
"-"
,
fileUrl:
tpcAgentsLists
[
index
]
.
idProofDirFilePath
??
"-"
),));
},
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
decorationColor:
AppColors
.
app_blue
,
),
),
),
),
),
),
),
]
else
if
(
subHeadings
[
j
]
==
"View"
)...[
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
tpcAgentsLists
[
index
]
.
idProofViewFileName
??
"-"
,
fileUrl:
tpcAgentsLists
[
index
]
.
idProofDirFilePath
??
"-"
),));
},
child:
Text
(
child:
Text
(
"
${subHeadings[j]}
"
,
"
${subHeadings[j]}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
Color
(
color:
AppColors
.
app_blue
,
0xFF818181
,
),
decoration:
TextDecoration
decoration:
TextDecoration
.
none
,
.
underline
,
decorationColor:
AppColors
decorationColor:
AppColors
.
app_blue
,
.
white
,
),
),
),
),
),
),
),
),
]
]
else
...[
Expanded
(
child:
InkResponse
(
],
child:
Text
(
),
"
${subHeadings[j]}
"
,
);
style:
TextStyle
(
}),
fontSize:
14
,
InkResponse
(
color:
Color
(
onTap:
()
async
{
0xFF818181
,
Navigator
.
push
(
context
,
MaterialPageRoute
(
),
builder:
(
context
)
=>
decoration:
TextDecoration
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
.
none
,
pageTitleName:
widget
.
pageTitleName
,
decorationColor:
AppColors
tpcAgentId:
tpcAgentsLists
[
index
]
.
white
,
.
tpcAgentId
,
),
),));
),
},
),
child:
Container
(
),
padding:
EdgeInsets
.
symmetric
(
]
vertical:
5
,
),
],
child:
Row
(
),
crossAxisAlignment:
);
CrossAxisAlignment
.
center
,
}),
mainAxisAlignment:
InkResponse
(
MainAxisAlignment
.
start
,
onTap:
()
async
{
children:
[
Navigator
.
push
(
context
,
MaterialPageRoute
(
Text
(
builder:
(
context
)
=>
"View Details"
,
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
style:
TextStyle
(
pageTitleName:
widget
.
pageTitleName
,
fontFamily:
"JakartaMedium"
,
tpcAgentId:
tpcAgentsLists
[
index
]
fontSize:
14
,
.
tpcAgentId
,
color:
AppColors
.
app_blue
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
"assets/svg/next_button.svg"
,
)
,
)
,
]
,
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
)
,
]
,
]
,
)
,
),
)
:
Emptywidget
(
context
)
,
)
:
Emptywidget
(
context
)
,
),
),
),
);
);
},
},
...
...
lib/screens/serviceEngineer/AccountSuggestions.dart
View file @
ecd8fcd1
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:generp/Notifiers/PaymentCollectionProvider.dart'
;
import
'package:generp/Notifiers/PaymentCollectionProvider.dart'
;
...
@@ -23,12 +25,14 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -23,12 +25,14 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Accounts"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
appBar:
appbar
(
context
,
"Accounts"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
decoration:
BoxDecoration
(
color:
Colors
.
white
),
child:
Column
(
child:
Column
(
children:
[
children:
[
...
@@ -62,7 +66,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -62,7 +66,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
focusNode:
searchFocusNode
,
focusNode:
searchFocusNode
,
textCapitalization:
TextCapitalization
.
characters
,
textCapitalization:
TextCapitalization
.
characters
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
.
length
>=
3
)
{
if
(
value
.
length
>=
3
)
{
...
@@ -96,14 +100,14 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -96,14 +100,14 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
style:
TextStyle
(
fontWeight:
FontWeight
.
w300
),
style:
TextStyle
(
fontWeight:
FontWeight
.
w300
),
),
),
),
),
Expanded
(
Expanded
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
child:
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
provider
.
accountList
!.
length
,
itemCount:
provider
.
accountList
!.
length
,
padding:
const
EdgeInsets
.
all
(
5
),
padding:
const
EdgeInsets
.
all
(
5
),
physics:
const
NeverScrollableScrollPhysics
(),
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
...
...
lib/screens/serviceEngineer/Followupdetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -36,12 +38,14 @@ class _FollowupdetailsState extends State<Followupdetails> {
...
@@ -36,12 +38,14 @@ class _FollowupdetailsState extends State<Followupdetails> {
var
followups
=
provider
.
followUpList
;
var
followups
=
provider
.
followUpList
;
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Follow Up Details"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
appBar:
appbar
(
context
,
"Follow Up Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
provider
.
followUpList
.
length
,
itemCount:
provider
.
followUpList
.
length
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
...
...
lib/screens/serviceEngineer/MonthlyCollection.dart
View file @
ecd8fcd1
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:generp/Notifiers/PaymentCollectionProvider.dart'
;
import
'package:generp/Notifiers/PaymentCollectionProvider.dart'
;
...
@@ -52,187 +54,191 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -52,187 +54,191 @@ class _MonthlycollectionState extends State<Monthlycollection> {
);
);
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
context
,
"Payment Collection"
,
provider
.
resetAll
,
sendWidget
),
child:
Scaffold
(
body:
SafeArea
(
child:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
resizeToAvoidBottomInset:
true
,
child:
ListView
.
builder
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
scrollDirection:
Axis
.
vertical
,
appBar:
appbar2
(
context
,
"Payment Collection"
,
provider
.
resetAll
,
sendWidget
),
shrinkWrap:
true
,
body:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
ListView
.
builder
(
itemCount:
provider
.
paymenCollectionList
.
length
,
scrollDirection:
Axis
.
vertical
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
provider
.
paymenCollectionList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
width:
30
,
width:
30
,
height:
30
,
height:
30
,
"assets/svg/se_block_head.svg"
,
"assets/svg/se_block_head.svg"
,
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
"
${provider.paymenCollectionList[index].accountName}
"
,
"
${provider.paymenCollectionList[index].accountName}
"
,
maxLines:
2
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
),
),
Text
(
"₹
${provider.paymenCollectionList[index].amount}
"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
),
),
),
// Text("Gen Pvt. Ltd"),
Text
(
],
"₹
${provider.paymenCollectionList[index].amount}
"
,
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
),
// Text("Gen Pvt. Ltd"),
],
),
),
),
),
),
Container
(
Container
(
height:
35
,
height:
35
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE3FFE0
),
color:
Color
(
0xFFE3FFE0
),
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
"
${provider.paymenCollectionList[index].approvalStatus}
"
,
"
${provider.paymenCollectionList[index].approvalStatus}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
13
,
fontSize:
13
,
color:
Color
(
0xFF0D9C00
))
,
color:
Color
(
0xFF0D9C00
)
),
),
),
),
),
),
// Expanded(
// flex: 1,
// child: InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: Icon(Icons.more_vert),
// ),
// ),
],
),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
),
// Expanded(
// flex: 1,
// child: InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: Icon(Icons.more_vert),
// ),
// ),
],
),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
),
),
SizedBox
(
height:
5
),
SizedBox
(
height:
5
),
...
List
.
generate
(
2
,
(
j
)
{
...
List
.
generate
(
2
,
(
j
)
{
final
textheads
=
[
"ID"
,
"Generator Type"
];
final
textheads
=
[
"ID"
,
"Generator Type"
];
final
text
Sub
heads
=
[
final
textSubheads
=
[
provider
.
paymenCollectionList
[
index
].
paymentRefNo
,
provider
.
paymenCollectionList
[
index
].
payment
RefNo
,
provider
.
paymenCollectionList
[
index
].
payment
Mode
,
provider
.
paymenCollectionList
[
index
].
paymentMode
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Column
(
child
:
Column
(
child
ren:
[
children:
[
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
),),
),
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
Text
(
child:
Text
(
textSubheads
[
j
].
toString
(),
textSubheads
[
j
].
toString
(),
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
),
),
),
),
),
),
),
],
],
),
),
],
],
),
);
}),
SizedBox
(
height:
10
),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
WebErpScreen
(
erp_url:
provider
.
paymenCollectionList
[
index
]
.
paymentProofFilePath
??
""
,
),
),
),
);
);
},
}),
child:
SizedBox
(
SizedBox
(
height:
10
),
child:
Row
(
InkResponse
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
onTap:
()
{
crossAxisAlignment:
CrossAxisAlignment
.
center
,
Navigator
.
push
(
children:
[
context
,
Text
(
MaterialPageRoute
(
"View Attachment"
,
builder:
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
),
(
context
)
=>
WebErpScreen
(
erp_url:
provider
.
paymenCollectionList
[
index
]
.
paymentProofFilePath
??
""
,
),
),
),
SizedBox
(
width:
5
),
);
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
),
},
],
child:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Attachment"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
),
],
),
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
)
,
)
:
Emptywidget
(
context
)
)
:
Emptywidget
(
context
),)
)
,
),
),
);
);
},
},
...
...
lib/screens/serviceEngineer/NearbyGenerators.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/gestures.dart'
;
...
@@ -214,12 +216,14 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -214,12 +216,14 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
context
,
"Nearby Generators"
,
provider
.
resetAll
,
sendWidget
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
appBar:
appbar2
(
context
,
"Nearby Generators"
,
provider
.
resetAll
,
sendWidget
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
...
@@ -234,6 +238,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -234,6 +238,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
height:
MediaQuery
.
of
(
context
).
size
.
height
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Stack
(
children:
[
child:
Stack
(
children:
[
GoogleMap
(
GoogleMap
(
scrollGesturesEnabled:
true
,
rotateGesturesEnabled:
true
,
myLocationEnabled:
true
,
myLocationEnabled:
true
,
zoomGesturesEnabled:
true
,
zoomGesturesEnabled:
true
,
zoomControlsEnabled:
true
,
zoomControlsEnabled:
true
,
...
@@ -371,6 +378,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -371,6 +378,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
],
],
),
),
),
),
SizedBox
(
height:
10
,),
Row
(
Row
(
children:
[
children:
[
Text
(
Text
(
...
@@ -391,8 +399,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -391,8 +399,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
],
],
),
),
InteractiveSlider
(
InteractiveSlider
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
4
,
vertical:
0
),
min:
1.0
,
min:
1.0
,
max:
10
0.0
,
max:
5
0.0
,
enabled:
true
,
enabled:
true
,
// backgroundColor: AppColors.app_blue,
// backgroundColor: AppColors.app_blue,
...
@@ -400,9 +409,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -400,9 +409,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
segmentDividerColor:
Color
(
0xFFF6F6F8
),
segmentDividerColor:
Color
(
0xFFF6F6F8
),
onChanged:
(
value
)
{
onChanged:
(
value
)
{
provider
.
currentValue
=
value
;
provider
.
currentValue
=
value
;
provider
.
debounce
(()
{
//
provider.debounce(() {
provider
.
LoadNearbyGeneratorsAPI
(
context
);
//
provider.LoadNearbyGeneratorsAPI(context);
},
Duration
(
milliseconds:
200
));
//
}, Duration(milliseconds: 200));
},
},
),
),
// Slider(
// Slider(
...
@@ -425,7 +434,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
...
@@ -425,7 +434,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
child:
InkWell
(
child:
InkWell
(
onTap:
()
{
onTap:
()
{
provider
.
debounce
(()
{
provider
.
debounce
(()
{
provider
.
LoadNearbyGeneratorsAPI
(
context
);
provider
.
LoadNearbyGeneratorsAPI
(
context
,
provider
.
currentValue
);
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
},
Duration
(
milliseconds:
500
));
},
Duration
(
milliseconds:
500
));
},
},
...
...
Prev
1
2
3
4
5
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