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
12aa06e4
"lib/screens/git@183.82.99.133:saisrinivas/gen_erp_2025.git" did not exist on "332a8e914c4aab70caf007a280d64c563822a035"
Commit
12aa06e4
authored
Aug 13, 2025
by
Sai Srinivas
Browse files
13-08-2025 By Sai Srinivas
Test Cases
parent
2a5b9635
Changes
20
Hide whitespace changes
Inline
Side-by-side
lib/Models/ordersModels/ordersDetailsByModeResponse.dart
View file @
12aa06e4
...
@@ -127,7 +127,7 @@ class OrderDetails {
...
@@ -127,7 +127,7 @@ class OrderDetails {
String
?
tpcaAgentName
;
String
?
tpcaAgentName
;
OrderDetails
(
OrderDetails
(
{
this
.
id
,
{
this
.
id
,
this
.
orderNumber
,
this
.
orderNumber
,
this
.
orderNumberHash
,
this
.
orderNumberHash
,
this
.
balanceAmount
,
this
.
balanceAmount
,
...
...
lib/Notifiers/crmProvider/addNewLeadsandProspectsProvider.dart
View file @
12aa06e4
...
@@ -844,10 +844,10 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
...
@@ -844,10 +844,10 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
nameError
=
"Please Enter Name"
;
nameError
=
"Please Enter Name"
;
isValid
=
false
;
isValid
=
false
;
}
}
//
if(customerMailIdController.text.trim().isEmpty){
if
(
customerMailIdController
.
text
.
trim
().
is
Not
Empty
&&
!
RegExp
(
r'\S+@\S+\.\S+'
).
hasMatch
(
customerMailIdController
.
text
)
){
//
mailIdError = "Please enter Email I
d
";
mailIdError
=
"Please enter
a proper
Email I
D
"
;
//
isValid = false;
isValid
=
false
;
//
}
}
if
(
mobileController
.
text
.
trim
().
isEmpty
){
if
(
mobileController
.
text
.
trim
().
isEmpty
){
mobileError
=
"Please enter Mobile Number"
;
mobileError
=
"Please enter Mobile Number"
;
isValid
=
false
;
isValid
=
false
;
...
...
lib/Notifiers/ordersProvider/addOrderProvider.dart
View file @
12aa06e4
...
@@ -566,66 +566,63 @@ String? productsEmptyError ;
...
@@ -566,66 +566,63 @@ String? productsEmptyError ;
notifyListeners
();
notifyListeners
();
}
}
dynamic
get
basicAmount
{
// dynamic get basicAmount {
double
total
=
0
;
// double total = 0;
for
(
var
controller
in
TaxableValueControllers
)
{
// total += double.tryParse(TaxableValueController.text)?.round() ?? 0.0;
total
+=
double
.
tryParse
(
controller
.
text
)?.
round
()
??
0.0
;
// basicAmountReadOnlyController.text = total.toStringAsFixed(2);
}
// return total;
basicAmountReadOnlyController
.
text
=
total
.
toStringAsFixed
(
2
);
// }
return
total
;
//
}
// dynamic get cgstAmount {
// double total = 0;
dynamic
get
cgstAmount
{
//
double
total
=
0
;
// final taxableValue =
for
(
int
i
=
0
;
i
<
ProductControllers
.
length
;
i
++)
{
// double.tryParse(TaxableValueController.text) ?? 0.0;
final
taxableValue
=
// final cgst = double.tryParse(CGSTController.text) ?? 0.0;
double
.
tryParse
(
TaxableValueControllers
[
i
].
text
)
??
0.0
;
// total += (taxableValue * cgst) / 100;
final
cgst
=
double
.
tryParse
(
CGSTControllers
[
i
].
text
)
??
0.0
;
//
total
+=
(
taxableValue
*
cgst
)
/
100
;
// cgstReadOnlyController.text = total.toStringAsFixed(2);
}
// return total;
cgstReadOnlyController
.
text
=
total
.
toStringAsFixed
(
2
);
// }
return
total
;
//
}
// dynamic get sgstAmount {
// double total = 0;
dynamic
get
sgstAmount
{
//
double
total
=
0
;
// final taxableValue =
for
(
int
i
=
0
;
i
<
ProductControllers
.
length
;
i
++)
{
// double.tryParse(TaxableValueController.text) ?? 0.0;
final
taxableValue
=
// final sgst = double.tryParse(SGSTController.text) ?? 0.0;
double
.
tryParse
(
TaxableValueControllers
[
i
].
text
)
??
0.0
;
// total += (taxableValue * sgst).round() / 100;
final
sgst
=
double
.
tryParse
(
SGSTControllers
[
i
].
text
)
??
0.0
;
//
total
+=
(
taxableValue
*
sgst
).
round
()
/
100
;
// sgstReadOnlyController.text = total.toStringAsFixed(2);
}
// return total;
sgstReadOnlyController
.
text
=
total
.
toStringAsFixed
(
2
);
// }
return
total
;
//
}
// dynamic get igstAmount {
// double total = 0;
dynamic
get
igstAmount
{
//
double
total
=
0
;
// final taxableValue =
for
(
int
i
=
0
;
i
<
ProductControllers
.
length
;
i
++)
{
// double.tryParse(TaxableValueController.text) ?? 0.0;
final
taxableValue
=
// final igst = double.tryParse(IGSTController.text) ?? 0.0;
double
.
tryParse
(
TaxableValueControllers
[
i
].
text
)
??
0.0
;
// total += (taxableValue * igst).round() / 100;
final
igst
=
double
.
tryParse
(
IGSTControllers
[
i
].
text
)
??
0.0
;
//
total
+=
(
taxableValue
*
igst
).
round
()
/
100
;
// igstReadOnlyController.text = total.toStringAsFixed(2);
}
// return total;
igstReadOnlyController
.
text
=
total
.
toStringAsFixed
(
2
);
// }
return
total
;
//
}
// dynamic get totalAmount {
// double total = basicAmount + cgstAmount + sgstAmount + igstAmount;
dynamic
get
totalAmount
{
// totalReadOnlyAmountController.text = total.round().toStringAsFixed(2);
double
total
=
basicAmount
+
cgstAmount
+
sgstAmount
+
igstAmount
;
// return total!;
totalReadOnlyAmountController
.
text
=
total
.
round
().
toStringAsFixed
(
2
);
// }
return
total
!;
}
void
addProduct
(
Map
<
String
,
dynamic
>
product
)
{
void
addProduct
(
Map
<
String
,
dynamic
>
product
)
{
productRows
.
add
(
product
);
productRows
.
add
(
product
);
updateSummaryCalculations
();
notifyListeners
();
notifyListeners
();
}
}
void
updateProduct
(
int
index
,
Map
<
String
,
dynamic
>
updatedProduct
)
{
void
updateProduct
(
int
index
,
Map
<
String
,
dynamic
>
updatedProduct
)
{
productRows
[
index
]
=
updatedProduct
;
productRows
[
index
]
=
updatedProduct
;
updateSummaryCalculations
();
notifyListeners
();
notifyListeners
();
}
}
...
@@ -649,6 +646,61 @@ String? productsEmptyError ;
...
@@ -649,6 +646,61 @@ String? productsEmptyError ;
notifyListeners
();
notifyListeners
();
}
}
void
updateSummaryCalculations
()
{
double
basicAmount
=
0.0
;
double
cgstAmount
=
0.0
;
double
sgstAmount
=
0.0
;
double
igstAmount
=
0.0
;
for
(
var
product
in
productRows
)
{
final
price
=
double
.
tryParse
(
product
[
'price'
]?.
toString
()
??
'0'
)
??
0.0
;
final
qty
=
double
.
tryParse
(
product
[
'qty'
]?.
toString
()
??
'0'
)
??
0.0
;
final
cgst
=
double
.
tryParse
(
product
[
'cgst_p'
]?.
toString
()
??
'0'
)
??
0.0
;
final
sgst
=
double
.
tryParse
(
product
[
'sgst_p'
]?.
toString
()
??
'0'
)
??
0.0
;
final
igst
=
double
.
tryParse
(
product
[
'igst_p'
]?.
toString
()
??
'0'
)
??
0.0
;
final
taxableValue
=
price
*
qty
;
basicAmount
+=
taxableValue
;
cgstAmount
+=
(
taxableValue
*
cgst
)
/
100
;
sgstAmount
+=
(
taxableValue
*
sgst
)
/
100
;
igstAmount
+=
(
taxableValue
*
igst
)
/
100
;
}
final
totalAmount
=
basicAmount
+
cgstAmount
+
sgstAmount
+
igstAmount
;
basicAmountReadOnlyController
.
text
=
basicAmount
.
toStringAsFixed
(
2
);
cgstReadOnlyController
.
text
=
cgstAmount
.
toStringAsFixed
(
2
);
sgstReadOnlyController
.
text
=
sgstAmount
.
toStringAsFixed
(
2
);
igstReadOnlyController
.
text
=
igstAmount
.
toStringAsFixed
(
2
);
totalReadOnlyAmountController
.
text
=
totalAmount
.
toStringAsFixed
(
2
);
notifyListeners
();
}
String
getJsonEncodedProducts
()
{
return
jsonEncode
(
productRows
);
}
dynamic
get
basicAmount
{
return
double
.
tryParse
(
basicAmountReadOnlyController
.
text
)
??
0.0
;
}
dynamic
get
cgstAmount
{
return
double
.
tryParse
(
cgstReadOnlyController
.
text
)
??
0.0
;
}
dynamic
get
sgstAmount
{
return
double
.
tryParse
(
sgstReadOnlyController
.
text
)
??
0.0
;
}
dynamic
get
igstAmount
{
return
double
.
tryParse
(
igstReadOnlyController
.
text
)
??
0.0
;
}
dynamic
get
totalAmount
{
return
double
.
tryParse
(
totalReadOnlyAmountController
.
text
)
??
0.0
;
}
void
updateSelectedSingleProduct
(
SaleProducts
?
product
)
{
void
updateSelectedSingleProduct
(
SaleProducts
?
product
)
{
_selectedSaleProducts
=
product
;
_selectedSaleProducts
=
product
;
_selectedSingleSaleProductID
=
product
!.
id
;
_selectedSingleSaleProductID
=
product
!.
id
;
...
@@ -675,99 +727,99 @@ String? productsEmptyError ;
...
@@ -675,99 +727,99 @@ String? productsEmptyError ;
notifyListeners
();
notifyListeners
();
}
}
String
getJsonEncodedProducts
()
{
return
jsonEncode
(
productRows
);
}
void
addNewRow
()
{
ProductControllers
.
add
(
TextEditingController
());
PriceControllers
.
add
(
TextEditingController
());
QuantityControllers
.
add
(
TextEditingController
(
text:
'1'
));
CGSTControllers
.
add
(
TextEditingController
(
text:
'9'
));
SGSTControllers
.
add
(
TextEditingController
(
text:
'9'
));
IGSTControllers
.
add
(
TextEditingController
(
text:
'0'
));
TaxableValueControllers
.
add
(
TextEditingController
());
TotalPriceControllers
.
add
(
TextEditingController
());
selectedSaleProductID
.
add
(
null
);
notifyListeners
();
}
void
removeRow
(
int
index
)
{
if
(
index
>=
0
&&
index
<
ProductControllers
.
length
)
{
ProductControllers
[
index
].
dispose
();
PriceControllers
[
index
].
dispose
();
QuantityControllers
[
index
].
dispose
();
CGSTControllers
[
index
].
dispose
();
SGSTControllers
[
index
].
dispose
();
IGSTControllers
[
index
].
dispose
();
TaxableValueControllers
[
index
].
dispose
();
TotalPriceControllers
[
index
].
dispose
();
ProductControllers
.
removeAt
(
index
);
PriceControllers
.
removeAt
(
index
);
QuantityControllers
.
removeAt
(
index
);
CGSTControllers
.
removeAt
(
index
);
SGSTControllers
.
removeAt
(
index
);
IGSTControllers
.
removeAt
(
index
);
TaxableValueControllers
.
removeAt
(
index
);
TotalPriceControllers
.
removeAt
(
index
);
selectedSaleProductID
.
removeAt
(
index
);
notifyListeners
();
}
}
void
updateSelectedProduct
(
int
index
,
SaleProducts
?
product
)
{
if
(
index
>=
0
&&
index
<
_saleProducts
.
length
)
{
_selectedSaleProducts
=
product
;
_selectedSaleProductID
[
index
]
=
product
!.
id
;
PriceControllers
[
index
].
text
=
product
!.
price
!;
updateRowCalculations
(
index
);
notifyListeners
();
}
}
void
updateRowCalculations
(
int
index
)
{
if
(
index
>=
0
&&
index
<
PriceControllers
.
length
)
{
final
inclusivePrice
=
double
.
tryParse
(
PriceControllers
[
index
].
text
)
??
0.0
;
final
quantity
=
double
.
tryParse
(
QuantityControllers
[
index
].
text
)
??
1.0
;
final
cgst
=
double
.
tryParse
(
CGSTControllers
[
index
].
text
)
??
0.0
;
final
sgst
=
double
.
tryParse
(
SGSTControllers
[
index
].
text
)
??
0.0
;
final
igst
=
double
.
tryParse
(
IGSTControllers
[
index
].
text
)
??
0.0
;
final
totalTaxRate
=
(
cgst
+
sgst
+
igst
)
/
100
;
// Calculate taxable value per unit
final
taxableValuePerUnit
=
inclusivePrice
/
(
1
+
totalTaxRate
);
// Total taxable value = taxable value per unit * quantity
final
totalTaxableValue
=
taxableValuePerUnit
*
quantity
;
TaxableValueControllers
[
index
].
text
=
totalTaxableValue
.
toStringAsFixed
(
0
,
);
notifyListeners
();
}
}
Map
<
String
,
dynamic
>
getFormData
()
{
// void addNewRow() {
final
List
<
Map
<
String
,
dynamic
>>
orders
=
[];
// ProductControllers.add(TextEditingController());
for
(
int
i
=
0
;
i
<
ProductControllers
.
length
;
i
++)
{
// PriceControllers.add(TextEditingController());
orders
.
add
({
// QuantityControllers.add(TextEditingController(text: '1'));
'product_id'
:
selectedSaleProductID
[
i
],
// CGSTControllers.add(TextEditingController(text: '9'));
'qty'
:
QuantityControllers
[
i
].
text
,
// SGSTControllers.add(TextEditingController(text: '9'));
'price'
:
PriceControllers
[
i
].
text
,
// IGSTControllers.add(TextEditingController(text: '0'));
'cgst_p'
:
CGSTControllers
[
i
].
text
,
// TaxableValueControllers.add(TextEditingController());
'sgst_p'
:
SGSTControllers
[
i
].
text
,
// TotalPriceControllers.add(TextEditingController());
'igst_p'
:
IGSTControllers
[
i
].
text
,
//
'total_price'
:
TaxableValueControllers
[
i
].
text
,
// selectedSaleProductID.add(null);
});
// notifyListeners();
}
// }
return
{
//
'orders'
:
orders
,
// void removeRow(int index) {
'basic_amount'
:
basicAmount
.
toStringAsFixed
(
2
),
// if (index >= 0 && index < ProductControllers.length) {
'cgst_amount'
:
cgstAmount
.
toStringAsFixed
(
2
),
// ProductControllers[index].dispose();
'sgst_amount'
:
sgstAmount
.
toStringAsFixed
(
2
),
// PriceControllers[index].dispose();
'igst_amount'
:
igstAmount
.
toStringAsFixed
(
2
),
// QuantityControllers[index].dispose();
'total_amount'
:
totalAmount
.
toStringAsFixed
(
2
),
// CGSTControllers[index].dispose();
'note'
:
noteController
.
text
,
// SGSTControllers[index].dispose();
};
// IGSTControllers[index].dispose();
}
// TaxableValueControllers[index].dispose();
// TotalPriceControllers[index].dispose();
// ProductControllers.removeAt(index);
// PriceControllers.removeAt(index);
// QuantityControllers.removeAt(index);
// CGSTControllers.removeAt(index);
// SGSTControllers.removeAt(index);
// IGSTControllers.removeAt(index);
// TaxableValueControllers.removeAt(index);
// TotalPriceControllers.removeAt(index);
// selectedSaleProductID.removeAt(index);
// notifyListeners();
// }
// }
//
// void updateSelectedProduct(int index, SaleProducts? product) {
// if (index >= 0 && index < _saleProducts.length) {
// _selectedSaleProducts = product;
// _selectedSaleProductID[index] = product!.id;
// PriceControllers[index].text = product!.price!;
// updateRowCalculations(index);
// notifyListeners();
// }
// }
//
// void updateRowCalculations(int index) {
// if (index >= 0 && index < PriceControllers.length) {
// final inclusivePrice =
// double.tryParse(PriceControllers[index].text) ?? 0.0;
// final quantity = double.tryParse(QuantityControllers[index].text) ?? 1.0;
// final cgst = double.tryParse(CGSTControllers[index].text) ?? 0.0;
// final sgst = double.tryParse(SGSTControllers[index].text) ?? 0.0;
// final igst = double.tryParse(IGSTControllers[index].text) ?? 0.0;
// final totalTaxRate = (cgst + sgst + igst) / 100;
// // Calculate taxable value per unit
// final taxableValuePerUnit = inclusivePrice / (1 + totalTaxRate);
// // Total taxable value = taxable value per unit * quantity
// final totalTaxableValue = taxableValuePerUnit * quantity;
// TaxableValueControllers[index].text = totalTaxableValue.toStringAsFixed(
// 0,
// );
// notifyListeners();
// }
// }
//
// Map<String, dynamic> getFormData() {
// final List<Map<String, dynamic>> orders = [];
// for (int i = 0; i < ProductControllers.length; i++) {
// orders.add({
// 'product_id': selectedSaleProductID[i],
// 'qty': QuantityControllers[i].text,
// 'price': PriceControllers[i].text,
// 'cgst_p': CGSTControllers[i].text,
// 'sgst_p': SGSTControllers[i].text,
// 'igst_p': IGSTControllers[i].text,
// 'total_price': TaxableValueControllers[i].text,
// });
// }
// return {
// 'orders': orders,
// 'basic_amount': basicAmount.toStringAsFixed(2),
// 'cgst_amount': cgstAmount.toStringAsFixed(2),
// 'sgst_amount': sgstAmount.toStringAsFixed(2),
// 'igst_amount': igstAmount.toStringAsFixed(2),
// 'total_amount': totalAmount.toStringAsFixed(2),
// 'note': noteController.text,
// };
// }
Future
<
void
>
ordersAddOrderAPIViewFunction
(
context
,
mode
)
async
{
Future
<
void
>
ordersAddOrderAPIViewFunction
(
context
,
mode
)
async
{
try
{
try
{
...
@@ -878,14 +930,21 @@ String? productsEmptyError ;
...
@@ -878,14 +930,21 @@ String? productsEmptyError ;
_accountDetails
=
data
.
accountDetails
!;
_accountDetails
=
data
.
accountDetails
!;
data
.
accountDetails
!.
accManagerId
!;
data
.
accountDetails
!.
accManagerId
!;
billingNameController
.
text
=
data
.
accountDetails
!.
name
!;
billingNameController
.
text
=
data
.
accountDetails
!.
name
!;
_selectedBillingStateID
=
data
.
accountDetails
!.
state
!;
print
(
"data.accountDetails!.state
${data.accountDetails!.state}
"
);
if
(
_selectedBillingStateID
!=
null
){
if
(
_selectedBillingStateID
!=
null
){
getDistrictAPI
(
context
,
_selectedBillingStateID
);
getDistrictAPI
(
context
,
_selectedBillingStateID
);
}
}
_selectedBillingDistrictID
=
data
.
accountDetails
!.
district
!;
if
(
_selectedBillingDistrictID
!=
null
){
if
(
_selectedBillingDistrictID
!=
null
){
getSubLocationAPI
(
context
,
_selectedBillingDistrictID
);
getSubLocationAPI
(
context
,
_selectedBillingDistrictID
);
}
}
_selectedBillingStates
=
billingStates
!.
firstWhere
((
e
)
=>
e
.
id
==
data
.
accountDetails
!.
state
!);
_selectedBillingStateID
=
data
.
accountDetails
!.
state
!;
_selectedBillingStateName
=
billingStates
!.
firstWhere
((
e
)
=>
e
.
id
==
data
.
accountDetails
!.
state
!).
name
;
_selectedBillingDistrictID
=
data
.
accountDetails
!.
district
!;
_selectedBillingSubLocID
=
data
.
accountDetails
!.
subLocality
!;
_selectedBillingSubLocID
=
data
.
accountDetails
!.
subLocality
!;
billingPincodeController
.
text
=
data
.
accountDetails
!.
pincode
!;
billingPincodeController
.
text
=
data
.
accountDetails
!.
pincode
!;
...
@@ -918,6 +977,9 @@ String? productsEmptyError ;
...
@@ -918,6 +977,9 @@ String? productsEmptyError ;
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
_billingDistricts
=
data
.
districts
!;
_billingDistricts
=
data
.
districts
!;
_selectedBillingDistricts
=
data
.
districts
!.
firstWhere
((
e
)
=>
e
.
id
==
accountDetails
!.
district
!);
_selectedBillingDistrictValue
=
data
.
districts
!.
firstWhere
((
e
)
=>
e
.
id
==
accountDetails
!.
district
!).
district
;
notifyListeners
();
notifyListeners
();
}
}
...
@@ -958,6 +1020,9 @@ String? productsEmptyError ;
...
@@ -958,6 +1020,9 @@ String? productsEmptyError ;
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
_billingSubLocations
=
data
.
subLocations
!;
_billingSubLocations
=
data
.
subLocations
!;
_selectedBillingSubLocations
=
data
.
subLocations
!.
firstWhere
((
e
)
=>
e
.
id
==
accountDetails
!.
subLocality
!);
_selectedBillingSubLocValue
=
data
.
subLocations
!.
firstWhere
((
e
)
=>
e
.
id
==
accountDetails
!.
subLocality
!).
subLocality
;
notifyListeners
();
notifyListeners
();
}
}
...
@@ -1003,6 +1068,31 @@ String? productsEmptyError ;
...
@@ -1003,6 +1068,31 @@ String? productsEmptyError ;
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
Future
<
List
<
TpcList
>>
fetchTPCAccountsfromAPI
(
context
,
mode
,
text
)
async
{
try
{
final
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
addOrderTPCAgentListAPI
(
provider
.
empId
,
provider
.
session
,
mode
,
text
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_tpcAgent
=
data
.
tpcList
!;
notifyListeners
();
return
_tpcAgent
;
}
else
{
return
[];
}
}
else
{
return
[];
}
}
catch
(
e
,
s
)
{
return
[];
}
}
Future
<
void
>
ordersAddOrderAPISubmitFunction
(
Future
<
void
>
ordersAddOrderAPISubmitFunction
(
context
,
context
,
mode
,
mode
,
...
@@ -1178,7 +1268,7 @@ String? productsEmptyError ;
...
@@ -1178,7 +1268,7 @@ String? productsEmptyError ;
)
async
{
)
async
{
print
(
search
);
print
(
search
);
try
{
try
{
if
(
search
.
isEmpty
)
{
if
(
search
==
null
)
{
_accountList
=
[];
_accountList
=
[];
_isLoading
=
false
;
_isLoading
=
false
;
notifyListeners
();
notifyListeners
();
...
@@ -1222,6 +1312,65 @@ String? productsEmptyError ;
...
@@ -1222,6 +1312,65 @@ String? productsEmptyError ;
}
}
}
}
Future
<
List
<
AccountList
>>
fetchAccountsFromApi
(
context
,
mode
,
accountId
,
search
,
)
async
{
print
(
search
);
try
{
if
(
search
==
null
)
{
_accountList
=
[];
_isLoading
=
false
;
notifyListeners
();
return
_accountList
;
}
_isLoading
=
true
;
notifyListeners
();
final
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
AddOrderPaymentSelectAccountAPI
(
provider
.
empId
,
provider
.
session
,
mode
,
search
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_accountList
=
data
.
accountList
!;
if
(
_selectedAccountList
!=
null
&&
!
_accountList
.
contains
(
_selectedAccountList
))
{
_selectedAccountList
=
null
;
_selectedAccountID
=
null
;
_selectedAccountName
=
null
;
}
_isLoading
=
false
;
notifyListeners
();
return
_accountList
;
}
else
{
selectAccountError
=
data
?.
message
??
"Failed to load accounts"
;
_isLoading
=
false
;
notifyListeners
();
return
[];
}
}
else
{
selectAccountError
=
"No data received from server"
;
_isLoading
=
false
;
notifyListeners
();
return
[];
}
}
catch
(
e
,
s
)
{
selectAccountError
=
"An error occurred while fetching accounts"
;
_isLoading
=
false
;
notifyListeners
();
return
[];
}
}
imgFromCamera
(
context
)
async
{
imgFromCamera
(
context
)
async
{
// Capture a photo
// Capture a photo
try
{
try
{
...
...
lib/Notifiers/ordersProvider/editOrderProvider.dart
View file @
12aa06e4
...
@@ -202,6 +202,24 @@ class Editorderprovider extends ChangeNotifier {
...
@@ -202,6 +202,24 @@ class Editorderprovider extends ChangeNotifier {
_erectionScope
=
[
"Included"
,
"Excluded"
];
_erectionScope
=
[
"Included"
,
"Excluded"
];
_unloadingScope
=
[
"Included"
,
"Excluded"
];
_unloadingScope
=
[
"Included"
,
"Excluded"
];
_freightScope
=
[
"Included"
,
"Excluded"
];
_freightScope
=
[
"Included"
,
"Excluded"
];
if
(
data
.
orderDetails
!.
dispatchStateId
!=
null
){
getDispatchDistrictAPI
(
context
,
data
.
orderDetails
!.
dispatchStateId
!);
}
if
(
data
.
orderDetails
!.
dispatchDistrictId
!=
null
){
getDispatchSubLocationAPI
(
context
,
data
.
orderDetails
!.
dispatchDistrictId
!);
}
_selectedDispatchStates
=
data
.
states
!.
firstWhere
((
e
)
=>
e
.
id
==
data
.
orderDetails
!.
dispatchStateId
!);
_selectedDispatchStateID
=
data
.
orderDetails
!.
dispatchStateId
!;
_selectedDispatchStateName
=
data
.
states
!.
firstWhere
((
e
)
=>
e
.
id
==
data
.
orderDetails
!.
dispatchStateId
!).
name
;
_selectedDispatchDistrictID
=
data
.
orderDetails
!.
dispatchDistrictId
!;
_selectedDispatchSubLocID
=
data
.
orderDetails
!.
dispatchSubLocationId
!;
dispatchAddressController
.
text
=
data
.
orderDetails
!.
dispatchAddress
!;
dispatchPincodeController
.
text
=
data
.
orderDetails
!.
dispatchPincode
!;
noteController
.
text
=
data
.
orderDetails
!.
note
!;
_selectedUnloadingScope
=
data
.
orderDetails
!.
unloadingScope
!;
_selectedErectionScope
=
data
.
orderDetails
!.
erectionScope
!;
_selectedFreightScope
=
data
.
orderDetails
!.
freightScope
!;
notifyListeners
();
notifyListeners
();
}
else
{}
}
else
{}
...
@@ -222,7 +240,8 @@ class Editorderprovider extends ChangeNotifier {
...
@@ -222,7 +240,8 @@ class Editorderprovider extends ChangeNotifier {
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
_dispatchDistricts
=
data
.
districts
!;
_dispatchDistricts
=
data
.
districts
!;
_selectedDispatchDistricts
=
data
.
districts
!.
firstWhere
((
e
)
=>
e
.
id
==
orderDetails
!.
dispatchDistrictId
!);
_selectedDispatchDistrictValue
=
data
.
districts
!.
firstWhere
((
e
)
=>
e
.
id
==
orderDetails
!.
dispatchDistrictId
!).
district
;
notifyListeners
();
notifyListeners
();
}
}
}
}
...
@@ -242,6 +261,8 @@ class Editorderprovider extends ChangeNotifier {
...
@@ -242,6 +261,8 @@ class Editorderprovider extends ChangeNotifier {
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
_dispatchSubLocations
=
data
.
subLocations
!;
_dispatchSubLocations
=
data
.
subLocations
!;
_selectedDispatchSubLocations
=
data
.
subLocations
!.
firstWhere
((
e
)
=>
e
.
id
==
orderDetails
!.
dispatchSubLocationId
!);
_selectedDispatchSubLocValue
=
data
.
subLocations
!.
firstWhere
((
e
)
=>
e
.
id
==
orderDetails
!.
dispatchSubLocationId
!).
subLocality
;
notifyListeners
();
notifyListeners
();
}
}
...
...
lib/Notifiers/ordersProvider/pagesDashboardProvider.dart
View file @
12aa06e4
...
@@ -362,10 +362,73 @@ class Pagesdashboardprovider extends ChangeNotifier {
...
@@ -362,10 +362,73 @@ class Pagesdashboardprovider extends ChangeNotifier {
orderId
,
orderId
,
);
);
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
_isLoading
=
true
;
//
_isLoading = true;
notifyListeners
();
notifyListeners
();
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
_orderDetails
=
data
.
orderDetails
!;
_orderDetails
=
data
.
orderDetails
??
OrderDetails
(
id:
""
,
orderNumber:
""
,
orderNumberHash:
""
,
balanceAmount:
""
,
accId:
""
,
refType:
""
,
refId:
""
,
salesPersonEmpId:
""
,
enteredEmpId:
""
,
dispatchStateId:
""
,
dispatchDistrictId:
""
,
dispatchSubLocationId:
""
,
dispatchPincode:
""
,
dispatchAddress:
""
,
basicAmount:
""
,
cgstAmount:
""
,
sgstAmount:
""
,
igstAmount:
""
,
paidAmount:
""
,
totalAmount:
""
,
status:
""
,
orderReceivedDate:
""
,
scheduledDispatchDate:
""
,
otp:
""
,
note:
""
,
poViewFileName:
""
,
poDirFilePath:
""
,
unloadingScope:
""
,
freightScope:
""
,
erectionScope:
""
,
saleOrderNumber:
""
,
invoiceNumber:
""
,
vehicleNumber:
""
,
driverName:
""
,
driverMobileNumber:
""
,
tpcApplicable:
""
,
requestedTpcAmount:
""
,
level1TpcApprovedAmount:
""
,
level2TpcApprovedAmount:
""
,
tpcPaymentMode:
""
,
tpcPaymentReferenceNo:
""
,
tpcPaymentAttachmentDirFilePath:
""
,
tpcPaymentAttachementViewFileName:
""
,
tpcStatus:
""
,
tpcAgentId:
""
,
isExist:
""
,
createdDatetime:
""
,
updatedDatetime:
""
,
accountName:
""
,
gstNumber:
""
,
billingAddress:
""
,
billingDistrict:
""
,
billingState:
""
,
billingSubLocality:
""
,
billingPincode:
""
,
stateName:
""
,
districtName:
""
,
subLocationName:
""
,
adjustedAmount:
""
,
enteredEmpName:
""
,
salesPersonEmpName:
""
,
tpcaAgentName:
""
);
_productsHistory
=
data
.
products
!;
_productsHistory
=
data
.
products
!;
_feedbackHistory
=
data
.
feedbackHistory
!;
_feedbackHistory
=
data
.
feedbackHistory
!;
_paymentHistory
=
data
.
paymentHistory
!;
_paymentHistory
=
data
.
paymentHistory
!;
...
...
lib/Notifiers/ordersProvider/tpcAgentsProvider.dart
View file @
12aa06e4
...
@@ -4,6 +4,7 @@ import 'package:camera/camera.dart';
...
@@ -4,6 +4,7 @@ import 'package:camera/camera.dart';
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:generp/Models/ordersModels/TPCListResponse.dart'
;
import
'package:generp/Models/ordersModels/TPCListResponse.dart'
;
import
'package:get/get.dart'
;
import
'package:image_picker/image_picker.dart'
;
import
'package:image_picker/image_picker.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -303,6 +304,10 @@ class Tpcagentsprovider extends ChangeNotifier{
...
@@ -303,6 +304,10 @@ class Tpcagentsprovider extends ChangeNotifier{
tpcMobileNumberError
=
"PLease Enter Your Mobile Number"
;
tpcMobileNumberError
=
"PLease Enter Your Mobile Number"
;
isValid
=
false
;
isValid
=
false
;
}
}
if
(
tpcMobileNumberController
.
text
.
trim
().
isNotEmpty
&&
tpcMobileNumberController
.
text
.
length
<
10
){
tpcMobileNumberError
=
"Please Enter a Valid Mobile Number"
;
isValid
=
false
;
}
if
(
_image_picked
==
0
){
if
(
_image_picked
==
0
){
imageError
=
"Please select ID Proof"
;
imageError
=
"Please select ID Proof"
;
...
...
lib/screens/crm/addLeadsProspectsScreen.dart
View file @
12aa06e4
...
@@ -899,9 +899,11 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
...
@@ -899,9 +899,11 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
),
),
],
],
if
(
provider
.
productsEmptyError
!.
trim
().
isNotEmpty
)...[
if
(
provider
.
productRows
.
isEmpty
)...[
if
(
provider
.
productsEmptyError
!=
null
)...[
errorWidget
(
context
,
provider
.
productsEmptyError
)
errorWidget
(
context
,
provider
.
productsEmptyError
)
]
]
]
],
],
),
),
),
),
...
...
lib/screens/order/addOrder.dart
View file @
12aa06e4
import
'dart:async'
;
import
'dart:io'
;
import
'dart:io'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
...
@@ -12,11 +13,14 @@ import 'package:generp/screens/notifierExports.dart';
...
@@ -12,11 +13,14 @@ import 'package:generp/screens/notifierExports.dart';
import
'package:generp/screens/order/addOrderAddProduct.dart'
;
import
'package:generp/screens/order/addOrderAddProduct.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Models/ordersModels/AddOrderPaymentSelectAccountResponse.dart'
;
import
'../../Models/ordersModels/AddOrderViewResponse.dart'
;
import
'../../Models/ordersModels/AddOrderViewResponse.dart'
;
import
'../../Models/ordersModels/addOrderTpcAgentListResponse.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
import
'../../Utils/commonWidgets.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:generp/Utils/commonServices.dart'
;
import
'package:generp/Utils/commonServices.dart'
;
import
'package:dropdown_search/dropdown_search.dart'
;
class
AddorderScreen
extends
StatefulWidget
{
class
AddorderScreen
extends
StatefulWidget
{
final
pageTitleName
;
final
pageTitleName
;
...
@@ -37,6 +41,7 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -37,6 +41,7 @@ class _AddorderScreenState extends State<AddorderScreen> {
final
_formKey
=
GlobalKey
<
FormState
>();
final
_formKey
=
GlobalKey
<
FormState
>();
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
GlobalKey
<
DropdownButton2State
<
AccountList
>>
_dropdownKey
=
GlobalKey
();
@override
@override
void
initState
()
{
void
initState
()
{
...
@@ -51,9 +56,16 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -51,9 +56,16 @@ class _AddorderScreenState extends State<AddorderScreen> {
if
(
provider
.
dateNow
==
null
)
{
if
(
provider
.
dateNow
==
null
)
{
provider
.
setDate
(
DateTime
.
now
());
provider
.
setDate
(
DateTime
.
now
());
}
}
provider
.
getLocationPermission
(
context
);
provider
.
getLocationPermission
(
context
);
provider
.
getCurrentLocation
();
provider
.
getCurrentLocation
();
provider
.
ordersAddOrderAPIViewFunction
(
context
,
widget
.
mode
);
provider
.
ordersAddOrderAPIViewFunction
(
context
,
widget
.
mode
);
provider
.
ordersAddOrderSelectAccountAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedAccountID
,
''
,
);
});
});
}
}
...
@@ -207,179 +219,366 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -207,179 +219,366 @@ class _AddorderScreenState extends State<AddorderScreen> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
TextWidget
(
context
,
"Account"
),
TextWidget
(
context
,
"Account"
),
InkResponse
(
DropdownSearch
<
AccountList
>(
onTap:
()
{
compareFn:
(
item1
,
item2
)
=>
true
,
if
(
focusNode
.
hasFocus
)
{
popupProps:
PopupProps
.
menu
(
focusNode
.
unfocus
();
showSearchBox:
true
,
}
else
{
searchFieldProps:
TextFieldProps
(
FocusScope
.
of
(
controller:
context
,
provider
.
dropDownSearchController
,
).
requestFocus
(
focusNode
);
decoration:
InputDecoration
(
}
isDense:
true
,
},
contentPadding:
child:
Container
(
const
EdgeInsets
.
symmetric
(
alignment:
Alignment
.
center
,
horizontal:
10
,
decoration:
BoxDecoration
(
vertical:
8
,
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
ListTile
(
onTap:
()
{
if
(
focusNode
.
hasFocus
)
{
focusNode
.
unfocus
();
}
else
{
FocusScope
.
of
(
context
,
).
requestFocus
(
focusNode
);
}
},
title:
TextFormField
(
focusNode:
focusNode
,
onTapUpOutside:
(
event
)
{
focusNode
.
unfocus
();
},
controller:
provider
.
dropDownSearchController
,
onChanged:
(
value
)
async
{
Future
.
delayed
(
Duration
(
milliseconds:
100
),
()
async
{
await
provider
.
ordersAddOrderSelectAccountAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedAccountID
,
value
,
);
},
);
},
decoration:
InputDecoration
(
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
8
,
),
hintText:
'Select Account Type'
,
hintStyle:
const
TextStyle
(
fontSize:
14
,
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
hintText:
'Search Account...'
,
border:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
AppColors
.
semi_black
,
),
),
),
),
trailing:
InkResponse
(
borderRadius:
BorderRadius
.
circular
(
8
),
onTap:
()
{
if
(
focusNode
.
hasFocus
)
{
focusNode
.
unfocus
();
}
else
{
FocusScope
.
of
(
context
,
).
requestFocus
(
focusNode
);
}
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
),
suffixIcon:
provider
.
isLoading
?
const
CircularProgressIndicator
()
:
null
,
),
),
onChanged:
(
value
)
{
Timer
(
const
Duration
(
milliseconds:
500
),
()
{
print
(
'Search query:
$value
'
);
// Items are fetched via the items parameter
},
);
},
),
),
),
),
if
(
provider
.
accountList
.
isNotEmpty
&&
focusNode
.
hasFocus
)
...[
Card
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
),
height:
provider
.
accountList
.
isNotEmpty
?
150
:
50
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Scrollbar
(
thickness:
2.5
,
radius:
Radius
.
circular
(
6
),
thumbVisibility:
true
,
child:
ListView
.
builder
(
itemCount:
provider
.
accountList
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
onTap:
()
async
{
if
(
provider
.
accountList
.
isNotEmpty
)
{
provider
.
selectedAccountList
=
provider
.
accountList
[
index
];
print
(
fit:
FlexFit
.
loose
,
"Selected Complaint Type:
${provider.accountList[index].text}
, ID:
${provider.accountList[index].id}
"
,
menuProps:
MenuProps
(
);
borderRadius:
BorderRadius
.
circular
(
8
),
provider
.
selectedAccountID
=
elevation:
8
,
provider
),
.
accountList
[
index
]
itemBuilder:
.
id
!;
(
context
,
item
,
isDisabled
,
isSelected
)
=>
provider
.
selectedAccountName
=
Padding
(
provider
padding:
EdgeInsets
.
symmetric
(
.
accountList
[
index
]
horizontal:
12
,
.
text
!;
vertical:
10
,
print
(
),
"hfjkshfg"
+
provider
.
selectedAccountID
.
toString
(),
);
provider
.
dropDownSearchController
.
text
=
provider
.
accountList
[
index
]
.
text
!;
provider
.
ordersAddOrderAccountDetailsAPIFunction
(
context
,
provider
.
selectedAccountID
,
);
}
// provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
provider
.
accountList
=
[];
provider
.
selectAccountError
=
""
;
provider
.
notifyListeners
();
},
child:
SizedBox
(
child:
SizedBox
(
height:
45
,
height:
20
,
child:
Align
(
child:
Text
(
alignment:
Alignment
.
centerLeft
,
item
.
text
!,
child:
Text
(
style:
const
TextStyle
(
provider
fontSize:
14
,
.
accountList
[
index
]
.
text
!,
),
),
),
),
),
),
);
),
},
),
items:
(
filter
,
infiniteScrollProps
)
async
{
print
(
'Fetching items for filter:
$filter
'
);
return
provider
.
fetchAccountsFromApi
(
context
,
widget
.
mode
,
provider
.
selectedAccountID
,
filter
,
);
},
itemAsString:
(
AccountList
?
item
)
=>
item
?.
text
??
''
,
onChanged:
(
AccountList
?
value
)
{
if
(
value
!=
null
)
{
print
(
'Selected account:
${value.text}
'
);
provider
.
selectedAccountList
=
(
value
);
provider
.
selectedAccountID
=
value
!.
id
!;
provider
.
selectedAccountName
=
value
!.
text
!;
provider
.
ordersAddOrderAccountDetailsAPIFunction
(
context
,
value
.
id
,
);
}
},
selectedItem:
provider
.
selectedAccountList
,
decoratorProps:
DropDownDecoratorProps
(
decoration:
InputDecoration
(
hintText:
'Select Account'
,
hintStyle:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
// labelText: 'Select Account',
enabledBorder:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
focusedBorder:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
AppColors
.
cyan_blue
,
),
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
disabledBorder:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
errorBorder:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
border:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
contentPadding:
ddtheme
.
buttonStyleData
.
padding
,
fillColor:
AppColors
.
text_field_color
,
filled:
true
,
),
),
),
),
],
onBeforePopupOpening:
(
selectedItem
)
async
{
provider
.
dropDownSearchController
.
clear
();
return
Future
.
value
();
},
// onBeforePopupOpening: () {
// print('Dropdown closed, clearing search');
// provider.dropDownSearchController.clear();
// },
),
// DropdownSearch<AccountList>(
// filterFn: (item, filter) {
// return provider.ordersAddOrderSelectAccountAPIFunction(
// widget.mode,
// provider.selectedAccountID,
// filter,
// );
// },
// popupProps: PopupProps.menu(
// showSearchBox: true,
// searchFieldProps: TextFieldProps(
// controller: provider.dropDownSearchController,
// decoration: InputDecoration(
// isDense: true,
// contentPadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
// hintText: 'Search Account...',
// border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(8),
// ),
// suffixIcon: provider.isLoading ? const CircularProgressIndicator() : null,
// ),
// ),
// emptyBuilder: (context, searchEntry) => const Padding(
// padding: EdgeInsets.all(8.0),
// child: Text('No accounts found, please search'),
// ),
// ),
//
// itemAsString: (AccountList? item) => item?.text ?? '',
// onChanged: (AccountList? value) {
// if (value != null) {
// print('Selected account: ${value.text}');
// provider.selectedAccountList = value;
// provider.selectedAccountID = value!.id!;
// provider.selectedAccountName
// provider.ordersAddOrderAccountDetailsAPIFunction(
// context,
// value.id,
// );
// }
// },
// selectedItem: provider.selectedAccountList,
//
// decoratorProps: DropDownDecoratorProps(
//
// decoration: InputDecoration(
// labelText: 'Select Account',
// border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(8),
// ),
// ),
// ),
//
//
// ),
// InkResponse(
// onTap: () {
// if (focusNode.hasFocus) {
// focusNode.unfocus();
// } else {
// FocusScope.of(
// context,
// ).requestFocus(focusNode);
// }
// },
// child: Container(
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: AppColors.text_field_color,
// borderRadius: BorderRadius.circular(14),
// ),
// child: ListTile(
// onTap: () {
// if (focusNode.hasFocus) {
// focusNode.unfocus();
// } else {
// FocusScope.of(
// context,
// ).requestFocus(focusNode);
// }
// },
// title: TextFormField(
// focusNode: focusNode,
// onTapUpOutside: (event) {
// focusNode.unfocus();
// },
// controller:
// provider.dropDownSearchController,
// onChanged: (value) async {
// Future.delayed(
// Duration(milliseconds: 100),
// () async {
// await provider
// .ordersAddOrderSelectAccountAPIFunction(
// context,
// widget.mode,
// provider.selectedAccountID,
// value,
// );
// },
// );
// },
// decoration: InputDecoration(
// enabledBorder: InputBorder.none,
// focusedBorder: InputBorder.none,
// isDense: true,
// contentPadding:
// const EdgeInsets.symmetric(
// horizontal: 0,
// vertical: 8,
// ),
//
// hintText: 'Select Account Type',
// hintStyle: const TextStyle(
// fontSize: 14,
// ),
// border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(
// 8,
// ),
// ),
// ),
// ),
//
// trailing: InkResponse(
// onTap: () {
// if (focusNode.hasFocus) {
// focusNode.unfocus();
// } else {
// FocusScope.of(
// context,
// ).requestFocus(focusNode);
// }
// },
// child: SvgPicture.asset(
// "assets/svg/arrow_dropdown.svg",
// height: 25,
// width: 20,
// ),
// ),
// ),
// ),
// ),
// if (provider.accountList.isNotEmpty &&
// focusNode.hasFocus) ...[
// Card(
// margin: EdgeInsets.symmetric(horizontal: 0),
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// ),
// height:
// provider.accountList.isNotEmpty
// ? 150
// : 50,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(16),
// ),
// child: Scrollbar(
// thickness: 2.5,
// radius: Radius.circular(6),
// thumbVisibility: true,
// child: ListView.builder(
// itemCount: provider.accountList.length,
// shrinkWrap: true,
// physics:
// AlwaysScrollableScrollPhysics(),
// itemBuilder: (context, index) {
// return InkResponse(
// onTap: () async {
// if (provider
// .accountList
// .isNotEmpty) {
// provider.selectedAccountList =
// provider.accountList[index];
//
// print(
// "Selected Complaint Type: ${provider.accountList[index].text}, ID: ${provider.accountList[index].id}",
// );
// provider.selectedAccountID =
// provider
// .accountList[index]
// .id!;
// provider.selectedAccountName =
// provider
// .accountList[index]
// .text!;
// print(
// "hfjkshfg" +
// provider.selectedAccountID
// .toString(),
// );
// provider
// .dropDownSearchController
// .text = provider
// .accountList[index]
// .text!;
// provider
// .ordersAddOrderAccountDetailsAPIFunction(
// context,
// provider
// .selectedAccountID,
// );
// }
// // provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
// provider.accountList = [];
// provider.selectAccountError = "";
// provider.notifyListeners();
// },
// child: SizedBox(
// height: 45,
// child: Align(
// alignment: Alignment.centerLeft,
// child: Text(
// provider
// .accountList[index]
// .text!,
// ),
// ),
// ),
// );
// },
// ),
// ),
// ),
// ),
// ],
if
(
provider
.
selectAccountError
!=
null
)
...[
if
(
provider
.
selectAccountError
!=
null
)
...[
errorWidget
(
errorWidget
(
context
,
context
,
...
@@ -686,17 +885,32 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -686,17 +885,32 @@ class _AddorderScreenState extends State<AddorderScreen> {
provider
.
billingDistricts
.
isNotEmpty
provider
.
billingDistricts
.
isNotEmpty
?
provider
.
selectedBillingDistricts
!=
?
provider
.
selectedBillingDistricts
!=
null
null
?
provider
.
billingDistricts
?
provider
.
billingDistricts
.
firstWhere
(
.
firstWhere
(
(
ord
)
=>
(
ord
)
=>
ord
.
id
==
ord
.
id
==
provider
provider
.
selectedBillingDistrictId
,
.
selectedBillingDistrictId
,
orElse:
()
{
orElse:
provider
.
selectedBillingDistricts
=
()
=>
provider
provider
.
billingDistricts
[
0
];
.
billingDistricts
[
0
],
provider
.
selectedBillingDistrictId
=
)
provider
.
billingDistricts
[
0
]
.
id
;
provider
.
selectedBillingDistrictValue
=
provider
.
billingDistricts
[
0
]
.
district
;
provider
.
getSubLocationAPI
(
context
,
provider
.
selectedBillingDistrictId
,
);
return
provider
.
billingDistricts
[
0
];
},
)
:
null
:
null
:
null
,
:
null
,
onChanged:
(
Districts
?
value
)
{
onChanged:
(
Districts
?
value
)
{
...
@@ -824,18 +1038,28 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -824,18 +1038,28 @@ class _AddorderScreenState extends State<AddorderScreen> {
.
isNotEmpty
.
isNotEmpty
?
provider
.
selectedBillingSubLocations
!=
?
provider
.
selectedBillingSubLocations
!=
null
null
?
provider
?
provider
.
billingSubLocations
.
firstWhere
(
.
billingSubLocations
(
ord
)
=>
.
firstWhere
(
ord
.
id
==
(
ord
)
=>
provider
ord
.
id
==
.
selectedBillingSubLocID
,
provider
orElse:
()
{
.
selectedBillingSubLocID
,
provider
.
selectedBillingSubLocations
=
orElse:
provider
()
=>
.
billingSubLocations
[
0
];
provider
provider
.
selectedBillingSubLocID
=
.
billingSubLocations
[
0
],
provider
)
.
billingSubLocations
[
0
]
.
id
;
provider
.
selectedBillingSubLocValue
=
provider
.
billingSubLocations
[
0
]
.
subLocality
;
return
provider
.
billingSubLocations
[
0
];
},
)
:
null
:
null
:
null
,
:
null
,
onChanged:
(
SubLocations
?
value
)
{
onChanged:
(
SubLocations
?
value
)
{
...
@@ -1013,6 +1237,7 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -1013,6 +1237,7 @@ class _AddorderScreenState extends State<AddorderScreen> {
ord
.
id
==
ord
.
id
==
provider
provider
.
selectedDispatchStateID
,
.
selectedDispatchStateID
,
orElse:
orElse:
()
=>
()
=>
provider
provider
...
@@ -1159,10 +1384,31 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -1159,10 +1384,31 @@ class _AddorderScreenState extends State<AddorderScreen> {
ord
.
id
==
ord
.
id
==
provider
provider
.
selectedDispatchDistrictId
,
.
selectedDispatchDistrictId
,
orElse:
()
=>
orElse:
()
{
provider
provider
.
selectedDispatchDistricts
=
.
dispatchDistricts
[
0
],
provider
.
dispatchDistricts
[
0
];
provider
.
selectedDispatchDistrictId
=
provider
.
dispatchDistricts
[
0
]
.
id
;
provider
.
selectedDispatchDistrictValue
=
provider
.
dispatchDistricts
[
0
]
.
district
;
provider
.
getDispatchSubLocationAPI
(
context
,
provider
.
selectedBillingDistrictId
,
);
return
provider
.
dispatchDistricts
[
0
];
},
// orElse:
// () =>
// provider
// .dispatchDistricts[0],
)
)
:
null
:
null
:
null
,
:
null
,
...
@@ -1297,10 +1543,28 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -1297,10 +1543,28 @@ class _AddorderScreenState extends State<AddorderScreen> {
ord
.
id
==
ord
.
id
==
provider
provider
.
selectedDispatchSubLocID
,
.
selectedDispatchSubLocID
,
orElse:
()
=>
orElse:
()
{
provider
provider
.
selectedDispatchSubLocations
=
.
dispatchSubLocations
[
0
],
provider
.
dispatchSubLocations
[
0
];
provider
.
selectedDispatchSubLocID
=
provider
.
dispatchSubLocations
[
0
]
.
id
;
provider
.
selectedDispatchSubLocValue
=
provider
.
dispatchSubLocations
[
0
]
.
subLocality
;
return
provider
.
dispatchSubLocations
[
0
];
},
// orElse:
// () =>
// provider
// .dispatchSubLocations[0],
)
)
:
null
:
null
:
null
,
:
null
,
...
@@ -1782,149 +2046,280 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -1782,149 +2046,280 @@ class _AddorderScreenState extends State<AddorderScreen> {
],
],
if
(
provider
.
selectedTpcStatus
==
"Yes"
)
...[
if
(
provider
.
selectedTpcStatus
==
"Yes"
)
...[
TextWidget
(
context
,
"TPC Agent"
),
TextWidget
(
context
,
"TPC Agent"
),
DropdownSearch
<
TpcList
>(
//dd
compareFn:
(
item1
,
item2
)
=>
true
,
Container
(
popupProps:
PopupProps
.
menu
(
alignment:
Alignment
.
center
,
showSearchBox:
true
,
decoration:
BoxDecoration
(
searchFieldProps:
TextFieldProps
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
ListTile
(
title:
TextFormField
(
focusNode:
focusNodetpc
,
onTapUpOutside:
(
event
)
{
focusNodetpc
.
unfocus
();
},
controller:
controller:
provider
.
dropDownTpcSearchController
,
provider
.
dropDownTpcSearchController
,
onChanged:
(
value
)
async
{
Future
.
delayed
(
Duration
(
milliseconds:
100
),
()
async
{
await
provider
.
ordersAddOrderTPCAgentFunction
(
context
,
widget
.
mode
,
value
,
);
},
);
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
isDense:
true
,
isDense:
true
,
contentPadding:
contentPadding:
const
EdgeInsets
.
symmetric
(
const
EdgeInsets
.
symmetric
(
horizontal:
0
,
horizontal:
1
0
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Select TPC Agent'
,
hintText:
'Search ...'
,
hintStyle:
const
TextStyle
(
fontSize:
14
,
),
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
AppColors
.
semi_black
,
),
borderRadius:
BorderRadius
.
circular
(
borderRadius:
BorderRadius
.
circular
(
8
,
8
,
),
),
),
),
suffixIcon:
provider
.
isLoading
?
const
CircularProgressIndicator
()
:
null
,
),
),
onChanged:
(
value
)
{
Timer
(
const
Duration
(
milliseconds:
500
),
()
{
print
(
'Search query:
$value
'
);
// Items are fetched via the items parameter
},
);
},
),
),
trailing:
InkResponse
(
fit:
FlexFit
.
loose
,
onTap:
()
{
menuProps:
MenuProps
(
if
(
focusNodetpc
.
hasFocus
)
{
borderRadius:
BorderRadius
.
circular
(
8
),
focusNodetpc
.
unfocus
();
elevation:
8
,
}
else
{
FocusScope
.
of
(
context
,
).
requestFocus
(
focusNodetpc
);
}
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
),
),
itemBuilder:
(
context
,
item
,
isDisabled
,
isSelected
,
)
=>
Padding
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
10
,
),
child:
SizedBox
(
height:
20
,
child:
Text
(
item
.
text
!,
style:
const
TextStyle
(
fontSize:
14
,
),
),
),
),
),
),
),
items:
(
filter
,
infiniteScrollProps
)
async
{
if
(
provider
.
tpcAgent
.
isNotEmpty
&&
print
(
'Fetching items for filter:
$filter
'
);
focusNodetpc
.
hasFocus
)
...[
return
provider
.
fetchTPCAccountsfromAPI
(
Card
(
context
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
widget
.
mode
,
child:
Container
(
filter
,
padding:
EdgeInsets
.
symmetric
(
);
horizontal:
10
,
},
itemAsString:
(
TpcList
?
item
)
=>
item
?.
text
??
''
,
onChanged:
(
TpcList
?
value
)
{
if
(
value
!=
null
)
{
print
(
'Selected account:
${value.text}
'
);
provider
.
selectedTpcAgent
=
(
value
);
provider
.
selectedTpcAgentID
=
value
!.
id
!;
provider
.
selectedTpcAgentValue
=
value
!.
text
!;
}
},
selectedItem:
provider
.
selectedTpcAgent
,
decoratorProps:
DropDownDecoratorProps
(
decoration:
InputDecoration
(
hintText:
'Select TPC Agent'
,
hintStyle:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
height:
150
,
// labelText: 'Select Account',
decoration:
BoxDecoration
(
enabledBorder:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
16
),
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Scrollbar
(
focusedBorder:
OutlineInputBorder
(
thickness:
2.5
,
borderSide:
BorderSide
(
radius:
Radius
.
circular
(
6
),
color:
AppColors
.
cyan_blue
,
thumbVisibility:
true
,
child:
ListView
.
builder
(
itemCount:
provider
.
tpcAgent
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
onTap:
()
async
{
if
(
provider
.
tpcAgent
.
isNotEmpty
)
{
provider
.
selectedTpcAgent
=
provider
.
tpcAgent
[
index
];
print
(
"Selected Complaint Type:
${provider.tpcAgent[index].text}
, ID:
${provider.tpcAgent[index].id}
"
,
);
provider
.
selectedTpcAgentID
=
provider
.
tpcAgent
[
index
]
.
id
!;
provider
.
selectedTpcAgentValue
=
provider
.
tpcAgent
[
index
]
.
text
!;
print
(
"hfjkshfg"
+
provider
.
selectedTpcAgentID
.
toString
(),
);
provider
.
dropDownTpcSearchController
.
text
=
provider
.
tpcAgent
[
index
]
.
text
!;
}
// provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
// provider.tpcAgent = [];
},
child:
SizedBox
(
height:
45
,
child:
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
provider
.
tpcAgent
[
index
]
.
text
!,
),
),
),
);
},
),
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
disabledBorder:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
errorBorder:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
border:
OutlineInputBorder
(
borderSide:
BorderSide
.
none
,
borderRadius:
BorderRadius
.
circular
(
8
),
),
contentPadding:
ddtheme
.
buttonStyleData
.
padding
,
fillColor:
AppColors
.
text_field_color
,
filled:
true
,
),
),
),
),
],
onBeforePopupOpening:
(
selectedItem
)
async
{
provider
.
dropDownSearchController
.
clear
();
return
Future
.
value
();
},
// onBeforePopupOpening: () {
// print('Dropdown closed, clearing search');
// provider.dropDownSearchController.clear();
// },
),
//dd
// Container(
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: AppColors.text_field_color,
// borderRadius: BorderRadius.circular(14),
// ),
// child: ListTile(
// title: TextFormField(
// focusNode: focusNodetpc,
// onTapUpOutside: (event) {
// focusNodetpc.unfocus();
// },
// controller:
// provider.dropDownTpcSearchController,
// onChanged: (value) async {
// Future.delayed(
// Duration(milliseconds: 100),
// () async {
// await provider
// .ordersAddOrderTPCAgentFunction(
// context,
// widget.mode,
// value,
// );
// },
// );
// },
// decoration: InputDecoration(
// enabledBorder: InputBorder.none,
// focusedBorder: InputBorder.none,
// isDense: true,
// contentPadding:
// const EdgeInsets.symmetric(
// horizontal: 0,
// vertical: 8,
// ),
// hintText: 'Select TPC Agent',
// hintStyle: const TextStyle(
// fontSize: 14,
// ),
// border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(
// 8,
// ),
// ),
// ),
// ),
//
// trailing: InkResponse(
// onTap: () {
// if (focusNodetpc.hasFocus) {
// focusNodetpc.unfocus();
// } else {
// FocusScope.of(
// context,
// ).requestFocus(focusNodetpc);
// }
// },
// child: SvgPicture.asset(
// "assets/svg/arrow_dropdown.svg",
// height: 25,
// width: 20,
// ),
// ),
// ),
// ),
// if (provider.tpcAgent.isNotEmpty &&
// focusNodetpc.hasFocus) ...[
// Card(
// margin: EdgeInsets.symmetric(horizontal: 0),
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// ),
// height: 150,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(16),
// ),
// child: Scrollbar(
// thickness: 2.5,
// radius: Radius.circular(6),
// thumbVisibility: true,
// child: ListView.builder(
// itemCount: provider.tpcAgent.length,
// shrinkWrap: true,
// physics:
// AlwaysScrollableScrollPhysics(),
// itemBuilder: (context, index) {
// return InkResponse(
// onTap: () async {
// if (provider
// .tpcAgent
// .isNotEmpty) {
// provider.selectedTpcAgent =
// provider.tpcAgent[index];
//
// print(
// "Selected Complaint Type: ${provider.tpcAgent[index].text}, ID: ${provider.tpcAgent[index].id}",
// );
// provider.selectedTpcAgentID =
// provider
// .tpcAgent[index]
// .id!;
// provider.selectedTpcAgentValue =
// provider
// .tpcAgent[index]
// .text!;
// print(
// "hfjkshfg" +
// provider
// .selectedTpcAgentID
// .toString(),
// );
// provider
// .dropDownTpcSearchController
// .text = provider
// .tpcAgent[index]
// .text!;
// }
// // provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
// // provider.tpcAgent = [];
// },
// child: SizedBox(
// height: 45,
// child: Align(
// alignment:
// Alignment.centerLeft,
// child: Text(
// provider
// .tpcAgent[index]
// .text!,
// ),
// ),
// ),
// );
// },
// ),
// ),
// ),
// ),
// ],
if
(
provider
.
selectedTPCAgentError
!=
null
)
...[
if
(
provider
.
selectedTPCAgentError
!=
null
)
...[
errorWidget
(
errorWidget
(
context
,
context
,
...
@@ -1948,17 +2343,18 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -1948,17 +2343,18 @@ class _AddorderScreenState extends State<AddorderScreen> {
errorWidget
(
context
,
provider
.
tpcAmountError
),
errorWidget
(
context
,
provider
.
tpcAmountError
),
],
],
],
],
SizedBox
(
height:
15
,
)
SizedBox
(
height:
15
)
,
],
],
),
),
),
),
),
),
),
),
Step
(
label:
Text
(
"Step 4"
,
style:
TextStyle
(
fontSize:
12
)),
Step
(
label:
Text
(
"Step 4"
,
style:
TextStyle
(
fontSize:
12
)),
title:
const
Text
(
''
),
title:
const
Text
(
''
),
isActive:
_currentStep
>=
1
,
isActive:
_currentStep
>=
1
,
content:
content:
OrderForm
(),
OrderForm
(
),
)
),
],
],
controlsBuilder:
(
context
,
details
)
{
controlsBuilder:
(
context
,
details
)
{
return
Column
(
return
Column
(
...
@@ -1971,39 +2367,41 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -1971,39 +2367,41 @@ class _AddorderScreenState extends State<AddorderScreen> {
:
()
{
:
()
{
print
(
_currentStep
);
print
(
_currentStep
);
if
(
provider
.
validateForm4
())
{
if
(
provider
.
validateForm4
())
{
if
(
provider
.
productRows
.
isNotEmpty
){
if
(
provider
.
productRows
.
isNotEmpty
)
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
var
order_prod_data
=
pr
ovider
.
getFormData
();
pr
int
(
print
(
order_prod_data
);
"Encoded Products :
${provider.getJsonEncodedProducts()}
"
,
print
(
order_prod_data
[
'orders'
]
);
);
provider
.
getCurrentLocation
();
provider
.
getCurrentLocation
();
provider
provider
.
ordersAddOrderAPISubmitFunction
(
.
ordersAddOrderAPISubmitFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
provider
.
selectedEmployeeID
,
provider
.
selectedEmployeeID
,
provider
.
selectedAccountID
,
provider
.
selectedAccountID
,
provider
provider
.
selectedDispatchDistrictId
,
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
provider
.
selectedUnloadingScope
,
.
selectedDispatchSubLocID
,
provider
.
selectedFreightScope
,
provider
.
selectedUnloadingScope
,
provider
.
selectedErectionScope
,
provider
.
selectedFreightScope
,
provider
.
selectedTpcStatus
,
provider
.
selectedErectionScope
,
provider
.
selectedTpcStatus
,
provider
.
selectedTpcStatus
,
provider
.
selectedBillingStateID
,
provider
.
selectedTpcStatus
,
provider
provider
.
selectedBillingStateID
,
.
selectedBillingDistrictId
,
provider
provider
.
selectedBillingSubLocID
,
.
selectedBillingDistrictId
,
provider
.
selectedTpcAgentID
,
provider
order_prod_data
[
'orders'
],
.
selectedBillingSubLocID
,
);
provider
.
selectedTpcAgentID
,
}
else
{
provider
.
getJsonEncodedProducts
(),
);
}
else
{
toast
(
context
,
"Add min. 1 product"
);
toast
(
context
,
"Add min. 1 product"
);
}
}
}
else
{
}
else
{
provider
.
submitClicked
=
false
;
provider
.
submitClicked
=
false
;
}
}
...
@@ -2038,19 +2436,18 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -2038,19 +2436,18 @@ class _AddorderScreenState extends State<AddorderScreen> {
onTap:
()
{
onTap:
()
{
setState
(()
{
setState
(()
{
if
(
_currentStep
==
0
)
{
if
(
_currentStep
==
0
)
{
if
(
provider
.
validateForm1
()){
if
(
provider
.
validateForm1
())
{
_currentStep
=
1
;
_currentStep
=
1
;
}
}
}
else
if
(
_currentStep
==
1
)
{
}
else
if
(
_currentStep
==
1
)
{
if
(
provider
.
validateForm2
())
{
if
(
provider
.
validateForm2
())
{
_currentStep
=
2
;
_currentStep
=
2
;
}
}
}
else
if
(
_currentStep
==
2
)
{
}
else
if
(
_currentStep
==
2
)
{
if
(
provider
.
validateForm3
())
{
if
(
provider
.
validateForm3
())
{
_currentStep
=
3
;
_currentStep
=
3
;
}
}
}
}
else
{
else
{
_currentStep
=
0
;
_currentStep
=
0
;
}
}
});
});
...
@@ -3646,9 +4043,7 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -3646,9 +4043,7 @@ class _AddorderScreenState extends State<AddorderScreen> {
?
null
?
null
:
()
{
:
()
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
var
order_prod_data
=
provider
.
getFormData
();
// var order_prod_data = provider.getFormData();
print
(
order_prod_data
);
print
(
order_prod_data
[
'orders'
]);
///[{"product_id":"1","qty":"1","price":"500","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"500"},
///[{"product_id":"1","qty":"1","price":"500","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"500"},
///{"product_id":"2","qty":"1","price":"1000","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"1000"}]
///{"product_id":"2","qty":"1","price":"1000","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"1000"}]
...
@@ -3658,18 +4053,18 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -3658,18 +4053,18 @@ class _AddorderScreenState extends State<AddorderScreen> {
widget
.
mode
,
widget
.
mode
,
provider
.
selectedEmployeeID
,
provider
.
selectedEmployeeID
,
provider
.
selectedAccountID
,
provider
.
selectedAccountID
,
provider
.
selectedDispatchStateID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
,
provider
.
selectedErectionScope
,
provider
.
selectedTpcStatus
,
provider
.
selectedTpcStatus
,
provider
.
selectedTpcStatus
,
provider
.
selectedBillingStateID
,
provider
.
selectedBillingStateID
,
provider
.
selectedBillingDistrictId
,
provider
.
selectedBillingDistrictId
,
provider
.
selectedBillingSubLocID
,
provider
.
selectedBillingSubLocID
,
provider
.
selectedTpcAgentID
,
provider
.
selectedTpcAgentID
,
order_prod_data
[
'orders'
]
,
{}
,
);
);
},
},
child:
Container
(
child:
Container
(
...
@@ -3818,14 +4213,8 @@ class OrderForm extends StatelessWidget {
...
@@ -3818,14 +4213,8 @@ class OrderForm extends StatelessWidget {
var
res
=
await
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Addorderaddproduct
(
type:
"Add"
),
(
context
)
=>
Addorderaddproduct
(
settings:
RouteSettings
(
name:
'Addorderaddproduct'
),
type:
"Add"
,
),
settings:
RouteSettings
(
name:
'Addorderaddproduct'
,
),
),
),
);
);
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3857,28 +4246,22 @@ class OrderForm extends StatelessWidget {
...
@@ -3857,28 +4246,22 @@ class OrderForm extends StatelessWidget {
if
(
provider
.
productRows
.
isNotEmpty
)
...[
if
(
provider
.
productRows
.
isNotEmpty
)
...[
const
SizedBox
(
height:
10
),
const
SizedBox
(
height:
10
),
SizedBox
(
SizedBox
(
height:
2
00
,
height:
2
15
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
horizontal
,
scrollDirection:
Axis
.
horizontal
,
itemCount:
provider
.
productRows
.
length
,
itemCount:
provider
.
productRows
.
length
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
final
product
=
final
product
=
provider
.
productRows
[
index
];
provider
.
productRows
[
index
];
final
productName
=
final
productName
=
provider
.
saleProducts
provider
.
saleProducts
.
firstWhere
(
.
firstWhere
(
(
p
)
=>
(
p
)
=>
p
.
id
==
product
[
'product_id'
],
p
.
id
==
orElse:
product
[
'product_id'
],
()
=>
orElse:
SaleProducts
(
id:
''
,
prodName:
'Unknown'
),
()
=>
SaleProducts
(
)
id:
''
,
prodName:
'Unknown'
,
),
)
.
prodName
;
.
prodName
;
final
prodPrice
=
final
prodPrice
=
product
[
'price'
]
??
'-'
;
product
[
'price'
]
??
'-'
;
final
prodQty
=
product
[
'qty'
]
??
'-'
;
final
prodQty
=
product
[
'qty'
]
??
'-'
;
final
totalPrice
=
product
[
'total_price'
]
??
'-'
;
final
totalPrice
=
product
[
'total_price'
]
??
'-'
;
final
cgstPercent
=
product
[
'cgst_p'
]
??
'-'
;
final
cgstPercent
=
product
[
'cgst_p'
]
??
'-'
;
...
@@ -3891,15 +4274,11 @@ class OrderForm extends StatelessWidget {
...
@@ -3891,15 +4274,11 @@ class OrderForm extends StatelessWidget {
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
(
context
)
=>
Addorderaddproduct
(
Addorderaddproduct
(
type:
"Edit"
,
type:
"Edit"
,
editIndex:
index
,
editIndex:
index
,
),
),
settings:
RouteSettings
(
settings:
RouteSettings
(
name:
'Addorderaddproduct'
),
name:
'Addorderaddproduct'
,
),
),
),
);
);
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3907,21 +4286,11 @@ class OrderForm extends StatelessWidget {
...
@@ -3907,21 +4286,11 @@ class OrderForm extends StatelessWidget {
}
}
},
},
child:
Container
(
child:
Container
(
width:
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.8
,
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.8
,
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
left:
index
==
0
?
10
:
5
,
left:
index
==
0
?
10
:
5
,
right:
right:
index
==
index
==
provider
.
productRows
.
length
-
1
?
10
:
5
,
provider
.
productRows
.
length
-
1
?
10
:
5
,
bottom:
5
,
bottom:
5
,
),
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
...
@@ -3930,16 +4299,13 @@ class OrderForm extends StatelessWidget {
...
@@ -3930,16 +4299,13 @@ class OrderForm extends StatelessWidget {
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
borderRadius:
BorderRadius
.
circular
(
14
),
BorderRadius
.
circular
(
14
),
),
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
...
@@ -3952,46 +4318,33 @@ class OrderForm extends StatelessWidget {
...
@@ -3952,46 +4318,33 @@ class OrderForm extends StatelessWidget {
flex:
6
,
flex:
6
,
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
CrossAxisAlignment
.
start
,
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
child:
Text
(
productName
??
productName
??
"-"
,
"-"
,
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
AppColors
.
semi_black
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
3
,
flex:
3
,
child:
Text
(
child:
Text
(
textAlign:
textAlign:
TextAlign
.
right
,
TextAlign
.
right
,
"₹
$prodPrice
"
,
"₹
$prodPrice
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
AppColors
.
semi_black
,
),
),
),
),
),
),
...
@@ -4000,25 +4353,19 @@ class OrderForm extends StatelessWidget {
...
@@ -4000,25 +4353,19 @@ class OrderForm extends StatelessWidget {
Text
(
Text
(
"x
$prodQty
"
,
"x
$prodQty
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
grey_semi
,
AppColors
.
grey_semi
,
),
),
),
),
SizedBox
(
height:
5
),
SizedBox
(
height:
5
),
],
],
),
),
),
),
],
],
),
),
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
2
),
vertical:
3
,
),
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
...
@@ -4046,24 +4393,21 @@ class OrderForm extends StatelessWidget {
...
@@ -4046,24 +4393,21 @@ class OrderForm extends StatelessWidget {
),
),
...
List
.
generate
(
4
,
(
j
)
{
...
List
.
generate
(
4
,
(
j
)
{
final
heads
=
[
final
heads
=
[
"Total Price"
,
"CGST"
,
"CGST"
,
"SGST"
,
"SGST"
,
"IGST"
,
"IGST"
,
"Total Amount"
,
];
];
final
subHeads
=
[
final
subHeads
=
[
"₹
$totalPrice
"
,
"
$cgstPercent
%"
,
"
$cgstPercent
%"
,
"
$sgstPercent
%"
,
"
$sgstPercent
%"
,
"
$igstPerecent
%"
,
"
$igstPerecent
%"
,
"₹
$totalPrice
"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
vertical:
3
,
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
...
@@ -4079,9 +4423,7 @@ class OrderForm extends StatelessWidget {
...
@@ -4079,9 +4423,7 @@ class OrderForm extends StatelessWidget {
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
),
...
@@ -4100,8 +4442,8 @@ class OrderForm extends StatelessWidget {
...
@@ -4100,8 +4442,8 @@ class OrderForm extends StatelessWidget {
),
),
),
),
],
],
if
(
provider
.
productsEmptyError
!=
null
)...[
if
(
provider
.
productsEmptyError
!=
null
)
...[
errorWidget
(
context
,
provider
.
productsEmptyError
)
errorWidget
(
context
,
provider
.
productsEmptyError
)
,
],
],
// Product Rows (Horizontal ListView)
// Product Rows (Horizontal ListView)
// if (provider.ProductControllers.isNotEmpty) ...[
// if (provider.ProductControllers.isNotEmpty) ...[
...
...
lib/screens/order/addTpcAgent.dart
View file @
12aa06e4
...
@@ -123,7 +123,9 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
...
@@ -123,7 +123,9 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
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
),
...
...
lib/screens/order/editOrderAccountDetails.dart
View file @
12aa06e4
...
@@ -63,11 +63,12 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
...
@@ -63,11 +63,12 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
appBar:
appbar2
New
(
context
,
context
,
"
${widget.pageTitleName}
"
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
provider
.
resetForm
,
SizedBox
(
width:
0
),
SizedBox
(
width:
0
),
0xFFFFFFFF
),
),
body:
Container
(
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
@@ -538,7 +539,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
...
@@ -538,7 +539,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
),
),
),
onWillPop:
()
async
{
onWillPop:
()
async
{
provider
.
resetForm
();
return
_onBackPressed
(
context
);
return
_onBackPressed
(
context
);
},
},
);
);
...
...
lib/screens/order/orderModuleDashboard.dart
View file @
12aa06e4
...
@@ -146,7 +146,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -146,7 +146,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
image:
AssetImage
(
image:
AssetImage
(
"assets/svg/order/main_dashboard.png"
,
"assets/svg/order/main_dashboard.png"
,
),
),
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
fitWidth
,
),
),
gradient:
LinearGradient
(
gradient:
LinearGradient
(
colors:
[
colors:
[
...
@@ -158,117 +158,117 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -158,117 +158,117 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
),
),
),
),
),
),
if
(
provider
.
ordersgain
.
length
>
0
)
...[
//
if (provider.ordersgain.length > 0) ...[
Container
(
//
Container(
padding:
EdgeInsets
.
symmetric
(
//
padding: EdgeInsets.symmetric(
horizontal:
10
,
//
horizontal: 10,
vertical:
5
,
//
vertical: 5,
),
//
),
margin:
EdgeInsets
.
only
(
bottom:
10
),
//
margin: EdgeInsets.only(bottom: 10),
decoration:
BoxDecoration
(
//
decoration: BoxDecoration(
color:
Colors
.
white
,
//
color: Colors.white,
borderRadius:
BorderRadius
.
vertical
(
//
borderRadius: BorderRadius.vertical(
bottom:
Radius
.
circular
(
16
),
//
bottom: Radius.circular(16),
),
//
),
),
//
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.25
,
//
height: MediaQuery.of(context).size.height * 0.25,
child:
GridView
.
builder
(
//
child: GridView.builder(
padding:
EdgeInsets
.
symmetric
(
//
padding: EdgeInsets.symmetric(
horizontal:
0
,
//
horizontal: 0,
vertical:
5
,
//
vertical: 5,
),
//
),
itemCount:
provider
.
ordersgain
.
length
,
//
itemCount: provider.ordersgain.length,
shrinkWrap:
true
,
//
shrinkWrap: true,
scrollDirection:
Axis
.
horizontal
,
//
scrollDirection: Axis.horizontal,
physics:
AlwaysScrollableScrollPhysics
(),
//
physics: AlwaysScrollableScrollPhysics(),
gridDelegate:
//
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
//
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount:
2
,
//
crossAxisCount: 2,
crossAxisSpacing:
10
,
//
crossAxisSpacing: 10,
mainAxisSpacing:
10
,
//
mainAxisSpacing: 10,
childAspectRatio:
55
/
100
,
//
childAspectRatio: 55 / 100,
),
//
),
itemBuilder:
(
context
,
jndex
)
{
//
itemBuilder: (context, jndex) {
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
//
final icons = ["comm_ic_1", "comm_ic_2"];
final
leadTitles
=
[
//
final leadTitles = [
'Order Gain'
,
//
'Order Gain',
'Dispatched'
,
//
'Dispatched',
'Pending Tasks'
,
//
'Pending Tasks',
'Quotation Generated'
,
//
'Quotation Generated',
];
//
];
final
assetNames
=
[
//
final assetNames = [
"assets/svg/crm/open_leads_ic.svg"
,
//
"assets/svg/crm/open_leads_ic.svg",
"assets/svg/crm/today_visits_ic.svg"
,
//
"assets/svg/crm/today_visits_ic.svg",
"assets/svg/crm/pending_tasks_ic.svg"
,
//
"assets/svg/crm/pending_tasks_ic.svg",
"assets/svg/crm/quotes_generated_ic.svg"
,
//
"assets/svg/crm/quotes_generated_ic.svg",
];
//
];
//
final
colors
=
[
//
final colors = [
0xFFE7FFE5
,
//
0xFFE7FFE5,
0xFFFFFCD5
,
//
0xFFFFFCD5,
0xFFEEF1FF
,
//
0xFFEEF1FF,
0xFFF3EDFF
,
//
0xFFF3EDFF,
];
//
];
final
textcolors
=
[
//
final textcolors = [
0xFF0D9C00
,
//
0xFF0D9C00,
0xFF605C00
,
//
0xFF605C00,
0xFF6563FF
,
//
0xFF6563FF,
0xFF493272
,
//
0xFF493272,
];
//
];
//
return
InkResponse
(
//
return InkResponse(
child:
Container
(
//
child: Container(
padding:
EdgeInsets
.
symmetric
(
//
padding: EdgeInsets.symmetric(
horizontal:
13
,
//
horizontal: 13,
),
//
),
decoration:
BoxDecoration
(
//
decoration: BoxDecoration(
color:
Color
(
colors
[
jndex
]),
//
color: Color(colors[jndex]),
borderRadius:
BorderRadius
.
circular
(
20
),
//
borderRadius: BorderRadius.circular(20),
),
//
),
child:
Column
(
//
child: Column(
crossAxisAlignment:
//
crossAxisAlignment:
CrossAxisAlignment
.
start
,
//
CrossAxisAlignment.start,
mainAxisAlignment:
//
mainAxisAlignment:
MainAxisAlignment
.
center
,
//
MainAxisAlignment.center,
children:
[
//
children: [
Text
(
//
Text(
provider
.
ordersgain
[
jndex
].
count
//
provider.ordersgain[jndex].count
.
toString
(),
//
.toString(),
style:
TextStyle
(
//
style: TextStyle(
fontSize:
20
,
//
fontSize: 20,
fontFamily:
"JakartaMedium"
,
//
fontFamily: "JakartaMedium",
color:
Color
(
textcolors
[
jndex
]),
//
color: Color(textcolors[jndex]),
),
//
),
),
//
),
Row
(
//
Row(
children:
[
//
children: [
Expanded
(
//
Expanded(
flex:
3
,
//
flex: 3,
child:
Text
(
//
child: Text(
leadTitles
[
jndex
],
//
leadTitles[jndex],
style:
TextStyle
(
//
style: TextStyle(
fontSize:
14
,
//
fontSize: 14,
fontFamily:
"JakartaRegular"
,
//
fontFamily: "JakartaRegular",
color:
AppColors
.
semi_black
,
//
color: AppColors.semi_black,
),
//
),
),
//
),
),
//
),
Expanded
(
//
Expanded(
flex:
1
,
//
flex: 1,
child:
SvgPicture
.
asset
(
//
child: SvgPicture.asset(
assetNames
[
jndex
],
//
assetNames[jndex],
),
//
),
),
//
),
],
//
],
),
//
),
],
//
],
),
//
),
),
//
),
);
//
);
},
//
},
),
//
),
),
//
),
],
//
],
],
],
),
),
),
),
...
...
lib/screens/order/ordersDetailsByModes.dart
View file @
12aa06e4
...
@@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
...
@@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/ordersProvider/dispatchOrderProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/dispatchOrderProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/pagesDashboardProvider.dart'
;
import
'package:generp/Notifiers/ordersProvider/pagesDashboardProvider.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
import
'package:generp/Utils/dropdownTheme.dart'
;
import
'package:generp/Utils/dropdownTheme.dart'
;
import
'package:generp/screens/screensExports.dart'
;
import
'package:generp/screens/screensExports.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -344,14 +345,14 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
...
@@ -344,14 +345,14 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
"Account Name"
,
"Account Name"
,
"Sales Person Name"
,
"Sales Person Name"
,
"Order Received Date"
,
"Order Received Date"
,
"OTP"
,
//
"OTP",
];
];
final
subHeadings2
=
[
final
subHeadings2
=
[
provider
.
orderDetails
.
orderNumber
??
"-"
,
provider
.
orderDetails
.
orderNumber
??
"-"
,
provider
.
orderDetails
.
accountName
??
"-"
,
provider
.
orderDetails
.
accountName
??
"-"
,
provider
.
orderDetails
.
salesPersonEmpName
??
"-"
,
provider
.
orderDetails
.
salesPersonEmpName
??
"-"
,
provider
.
orderDetails
.
orderReceivedDate
??
"-"
,
provider
.
orderDetails
.
orderReceivedDate
??
"-"
,
provider
.
orderDetails
.
otp
??
"-"
,
//
provider.orderDetails.otp ?? "-",
];
];
final
headings3
=
[
final
headings3
=
[
...
@@ -503,1544 +504,1530 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
...
@@ -503,1544 +504,1530 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
],
],
];
];
return
WillPopScope
(
return
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2New
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
"Order Details"
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2New
(
SizedBox
.
shrink
(),
context
,
0xFFFFFFFF
,
widget
.
mode
==
""
),
?
"Order Details"
backgroundColor:
AppColors
.
scaffold_bg_color
,
:
"Order Details (
${widget.mode}
)"
,
body:
SingleChildScrollView
(
provider
.
resetAll
,
child:
Column
(
SizedBox
.
shrink
(),
children:
[
0xFFFFFFFF
,
Card
(
),
shape:
RoundedRectangleBorder
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
borderRadius:
BorderRadius
.
only
(
body:
SingleChildScrollView
(
bottomLeft:
Radius
.
circular
(
30
),
child:
Column
(
bottomRight:
Radius
.
circular
(
30
),
children:
[
),
Card
(
),
shape:
RoundedRectangleBorder
(
elevation:
2
,
borderRadius:
BorderRadius
.
only
(
child:
Container
(
bottomLeft:
Radius
.
circular
(
30
),
decoration:
BoxDecoration
(
bottomRight:
Radius
.
circular
(
30
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
),
elevation:
2
,
),
child:
Container
(
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
color:
Colors
.
white
,
vertical:
10
,
borderRadius:
BorderRadius
.
only
(
horizontal:
10
,
bottomLeft:
Radius
.
circular
(
30
),
),
bottomRight:
Radius
.
circular
(
30
),
child:
Column
(
),
children:
[
),
Row
(
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
child:
Column
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
45
,
child:
Container
(
width:
45
,
height:
45
,
padding:
EdgeInsets
.
all
(
7.5
),
width:
45
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
7.5
),
color:
Color
(
0xFFE6F6FF
),
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Color
(
0xFFE6F6FF
),
// borderRadius: BorderRadius.circular(8),
shape:
BoxShape
.
circle
,
// borderRadius: BorderRadius.circular(8),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
),
SizedBox
(
width:
10
),
child:
SvgPicture
.
asset
(
Expanded
(
"assets/svg/fin_ic.svg"
,
flex:
4
,
),
child:
SizedBox
(
),
child:
Column
(
),
crossAxisAlignment:
SizedBox
(
width:
10
),
CrossAxisAlignment
.
start
,
Expanded
(
children:
[
flex:
4
,
InkResponse
(
child:
SizedBox
(
onTap:
()
{},
child:
Column
(
child:
Padding
(
crossAxisAlignment:
padding:
const
EdgeInsets
.
only
(
CrossAxisAlignment
.
start
,
top:
8.0
,
children:
[
bottom:
4
,
InkResponse
(
),
onTap:
()
{},
child:
Text
(
child:
Padding
(
orderDetails
.
accountName
==
""
padding:
const
EdgeInsets
.
only
(
?
"-"
top:
8.0
,
:
orderDetails
.
accountName
??
bottom:
4
,
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
height:
1.2
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
Text
(
child:
Text
(
orderDetails
.
balanceAmount
==
""
orderDetails
.
accountName
==
""
?
"-"
?
"-"
:
"₹
${orderDetails.balanceAmount}
"
,
:
orderDetails
.
accountName
??
"-"
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
height:
1.2
,
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
]
,
)
,
),
),
),
Text
(
orderDetails
.
balanceAmount
==
""
?
"-"
:
"
${orderDetails.balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
horizontal:
5
,
vertical:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
getDecorationColor
(
color:
getDecorationColor
(
orderDetails
.
status
??
"-"
,
orderDetails
.
status
??
"-"
,
),
),
child:
Center
(
child:
Text
(
orderDetails
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
getTextColor
(
orderDetails
.
status
,
),
),
),
),
child:
Center
(
),
child:
Text
(
),
orderDetails
.
status
??
"-"
,
),
textAlign:
TextAlign
.
center
,
),
style:
TextStyle
(
Expanded
(
fontFamily:
"JakartaMedium"
,
flex:
1
,
fontSize:
14
,
child:
InkResponse
(
color:
getTextColor
(
onTap:
()
async
{
orderDetails
.
status
,
var
res
=
await
Navigator
.
push
(
),
context
,
),
MaterialPageRoute
(
builder:
(
context
)
=>
Editorderaccountdetails
(
mode:
widget
.
mode
,
pageTitleName:
"Edit Order"
,
orderID:
widget
.
orderId
,
),
settings:
RouteSettings
(
name:
'Editorderaccountdetails'
,
),
),
),
),
);
if
(
routeSettingName
==
'Editorderaccountdetails'
)
{
provider
.
ordersDetailsByModeAPIFunction
(
context
,
widget
.
orderId
,
widget
.
mode
,
);
}
},
child:
Container
(
height:
32
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_details_edit_ic.svg"
,
),
),
),
),
Expanded
(
),
flex:
1
,
),
child:
InkResponse
(
],
onTap:
()
async
{
),
var
res
=
await
Navigator
.
push
(
SizedBox
(
height:
10
),
context
,
Column
(
MaterialPageRoute
(
children:
List
.
generate
(
sections
.
length
,
(
builder:
sectionIndex
,
(
context
)
=>
)
{
Editorderaccountdetails
(
final
section
=
sections
[
sectionIndex
];
mode:
widget
.
mode
,
final
title
=
section
[
"title"
]
as
String
;
pageTitleName:
"Edit Order"
,
final
headings
=
orderID:
section
[
"headings"
]
as
List
<
String
>;
provider
final
subHeadings
=
.
orderDetails
section
[
"subHeadings"
]
as
List
<
String
>;
.
id
,
),
return
Column
(
settings:
RouteSettings
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
name:
'Editorderaccountdetails'
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
),
);
if
(
res
==
true
)
{
provider
.
ordersDetailsByModeAPIFunction
(
context
,
widget
.
orderId
,
widget
.
mode
,
);
}
},
child:
Container
(
height:
32
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_details_edit_ic.svg"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
),
),
],
),
Column
(
SizedBox
(
height:
10
),
children:
List
.
generate
(
headings
.
length
,
(
Column
(
j
,
children:
List
.
generate
(
sections
.
length
,
(
)
{
sectionIndex
,
return
Container
(
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
vertical:
7
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
3
,
child:
Text
(
child:
Text
(
title
,
headings
[
j
]
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
6
,
child:
InkResponse
(
child:
DottedLine
(
onTap:
dashGapLength:
4
,
subHeadings
[
j
]
==
"View"
dashGapColor:
Colors
.
white
,
?
()
{}
dashColor:
AppColors
.
grey_semi
,
:
null
,
dashLength:
2
,
child:
Text
(
lineThickness:
0.5
,
subHeadings
[
j
].
isEmpty
),
?
"-"
)
,
:
subHeadings
[
j
]
,
]
,
textAlign:
TextAlign
.
right
,
),
style:
TextStyle
(
)
,
fontSize:
14
,
Column
(
decoration:
children:
List
.
generate
(
headings
.
length
,
(
subHeadings
[
j
]
==
j
,
"View"
)
{
?
TextDecoration
return
Container
(
.
underline
padding:
EdgeInsets
.
symmetric
(
:
TextDecoration
vertical:
7
,
.
none
,
),
decorationColor:
child:
Row
(
AppColors
.
app_blue
,
crossAxisAlignment:
color:
CrossAxisAlignment
.
start
,
subHeadings
[
j
]
==
children:
[
"View"
Expanded
(
?
AppColors
child:
Text
(
.
app_blue
headings
[
j
],
:
Color
(
style:
TextStyle
(
0xFF818181
,
fontFamily:
),
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
subHeadings
[
j
]
==
"View"
?
()
{}
:
null
,
child:
Text
(
subHeadings
[
j
].
isEmpty
?
"-"
:
subHeadings
[
j
],
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
]
,
)
,
),
),
);
],
}),
),
],
);
}),
),
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
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
)
,
)
;
]
,
})
,
),
),
),
],
),
);
SizedBox
(
height:
10
),
}),
],
),
),
),
),
Column
(
InkResponse
(
children:
[
onTap:
()
async
{
///product details
provider
.
showMoreDetails
=
if
(
productsHistory
.
isNotEmpty
)
...[
!
provider
.
showMoreDetails
;
Container
(
},
padding:
EdgeInsets
.
only
(
child:
Container
(
left:
10
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
right:
10
,
top:
10
,
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
Text
(
child:
Text
(
provider
.
showMoreDetails
textAlign:
TextAlign
.
left
,
?
"Hide Details"
"Product Details"
,
:
"View Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
color:
AppColors
.
app_blue
,
),
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
),
),
],
],
),
),
),
),
),
SizedBox
(
height:
10
),
],
),
),
),
SizedBox
(
Column
(
width:
double
.
infinity
,
children:
[
height:
300
,
///product details
child:
ListView
.
builder
(
if
(
productsHistory
.
isNotEmpty
)
...[
physics:
AlwaysScrollableScrollPhysics
(),
Container
(
shrinkWrap:
true
,
padding:
EdgeInsets
.
only
(
scrollDirection:
Axis
.
horizontal
,
left:
10
,
padding:
EdgeInsets
.
symmetric
(
right:
10
,
vertical:
5
,
top:
10
,
horizontal:
10
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
"Product Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
itemCount:
productsHistory
.
length
,
),
itemBuilder:
(
context
,
lp
)
{
],
return
Container
(
),
height:
300
,
),
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
// vertical: 10,
),
child:
Column
(
SizedBox
(
width:
double
.
infinity
,
height:
300
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
),
itemCount:
productsHistory
.
length
,
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
300
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
// vertical: 10,
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
flex:
1
,
crossAxisAlignment:
child:
SvgPicture
.
asset
(
CrossAxisAlignment
.
start
,
"assets/svg/crm/product_details_ic.svg"
,
children:
[
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/product_details_ic.svg"
,
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
6
,
child:
SizedBox
(
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Row
(
children:
[
Expanded
(
flex:
4
,
child:
Text
(
productsHistory
[
lp
]
.
productName
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
flex:
2
,
child:
Text
(
textAlign:
TextAlign
.
right
,
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
),
Text
(
"x
${productsHistory[lp].qty ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
SizedBox
(
height:
5
),
// DottedLine(
// dashGapLength: 4,
// dashGapColor: Colors.white,
// dashColor: AppColors.grey_semi,
// dashLength: 2,
// lineThickness: 0.5,
// ),
// SizedBox(height: 5),
// Text(
// "₹${productsHistory[lp].totalPrice ?? " - "}",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
],
),
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Tax Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
),
),
...
List
.
generate
(
3
,
(
j
)
{
SizedBox
(
width:
10
),
final
heads
=
[
Expanded
(
"CGST (%)"
,
flex:
6
,
"SGST (%)"
,
child:
SizedBox
(
"IGST (%)"
,
child:
Column
(
];
// mainAxisAlignment: MainAxisAlignment.start,
final
subHeads
=
[
productsHistory
[
lp
].
cgstPercentage
??
"-"
,
productsHistory
[
lp
].
sgstPercentage
??
"-"
,
productsHistory
[
lp
].
igstPercentage
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Row
(
child:
Text
(
children:
[
textAlign:
TextAlign
.
left
,
Expanded
(
heads
[
j
],
flex:
4
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
textAlign:
productsHistory
[
lp
]
TextAlign
.
right
,
.
productName
??
subHeads
[
j
]
==
""
"-"
,
?
"-"
maxLines:
2
,
:
subHeads
[
j
],
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
app_blue
,
AppColors
decorationColor:
.
semi_black
,
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
),
Expanded
(
]
else
...[
flex:
2
,
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
],
),
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Price Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Unit Price"
,
"Total Price"
];
final
subHeads
=
[
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
"₹
${productsHistory[lp].totalPrice ?? "-"}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
textAlign:
textAlign:
TextAlign
.
right
,
TextAlign
.
right
,
subHeads
[
j
]
==
""
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
app_blue
,
AppColors
decorationColor:
.
app_blue
,
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
],
),
Text
(
"x
${productsHistory[lp].qty ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
]
else
...[
),
Expanded
(
SizedBox
(
height:
5
),
child:
Text
(
// DottedLine(
textAlign:
TextAlign
.
right
,
// dashGapLength: 4,
subHeads
[
j
]
==
""
// dashGapColor: Colors.white,
?
"-"
// dashColor: AppColors.grey_semi,
:
subHeads
[
j
],
// dashLength: 2,
style:
TextStyle
(
// lineThickness: 0.5,
fontSize:
14
,
// ),
color:
Color
(
0xFF818181
),
// SizedBox(height: 5),
),
// Text(
),
// "₹${productsHistory[lp].totalPrice ?? " - "}",
),
// style: TextStyle(
],
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
],
],
),
),
)
;
)
,
}
),
),
],
],
),
),
);
Container
(
},
padding:
EdgeInsets
.
symmetric
(
),
vertical:
7.5
,
),
),
],
child:
Row
(
children:
[
///Feedback details
Expanded
(
Container
(
flex:
3
,
padding:
EdgeInsets
.
only
(
child:
Text
(
left:
10
,
"Tax Details"
,
right:
10
,
style:
TextStyle
(
top:
10
,
fontSize:
14
,
),
fontFamily:
"JakartaSemiBold"
,
child:
Row
(
),
children:
[
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
"Feedback Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
if
(
feedbackHistory
.
isNotEmpty
)
...[
Expanded
(
child:
InkResponse
(
onTap:
()
async
{
_showFeedbackSheet
(
context
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
textAlign:
TextAlign
.
right
,
"+ Feedback Update"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
),
),
),
...
List
.
generate
(
3
,
(
j
)
{
],
final
heads
=
[
],
"CGST (%)"
,
),
"SGST (%)"
,
),
"IGST (%)"
,
if
(
feedbackHistory
.
isNotEmpty
)
...[
];
SizedBox
(
final
subHeads
=
[
width:
double
.
infinity
,
productsHistory
[
lp
].
cgstPercentage
??
"-"
,
height:
220
,
productsHistory
[
lp
].
sgstPercentage
??
"-"
,
child:
ListView
.
builder
(
productsHistory
[
lp
].
igstPercentage
??
"-"
,
physics:
AlwaysScrollableScrollPhysics
(),
];
shrinkWrap:
true
,
return
Container
(
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
vertical:
10
,
),
horizontal:
10
,
child:
Row
(
),
itemCount:
feedbackHistory
.
length
,
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
220
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
child:
Text
(
child:
SvgPicture
.
asset
(
textAlign:
TextAlign
.
left
,
"assets/svg/crm/followup_details_ic.svg"
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
SizedBox
(
width:
10
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
Expanded
(
flex:
6
,
child:
InkResponse
(
child:
SizedBox
(
onTap:
()
{
child:
Column
(
Navigator
.
push
(
// mainAxisAlignment: MainAxisAlignment.start,
context
,
crossAxisAlignment:
MaterialPageRoute
(
CrossAxisAlignment
.
start
,
builder:
mainAxisAlignment:
(
MainAxisAlignment
.
start
,
context
,
children:
[
)
=>
Fileviewer
(
Row
(
fileName:
children:
[
feedbackHistory
[
lp
].
attachmentViewFileName
!,
Expanded
(
fileUrl:
flex:
4
,
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
feedbackHistory
[
lp
]
.
employeNaem
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
feedbackHistory
[
lp
]
.
createdDatetime
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
Expanded
(
flex:
2
,
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFF3FFD5
,
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
center
,
"
${feedbackHistory[lp].status ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF586000
,
),
),
),
),
),
),
),
],
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
]
,
)
,
),
),
),
),
),
]
else
...[
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
Expanded
(
flex:
3
,
child:
Text
(
child:
Text
(
"Feedback"
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
color:
Color
(
0xFF818181
)
,
),
),
),
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
],
)
,
]
,
),
),
...
List
.
generate
(
2
,
(
j
)
{
);
final
heads
=
[
}),
"Feedback"
,
"Attachment"
,
Container
(
];
padding:
EdgeInsets
.
symmetric
(
final
subHeads
=
[
vertical:
7.5
,
feedbackHistory
[
lp
].
feedback
??
"-"
,
),
"View"
,
child:
Row
(
];
children:
[
return
Container
(
Expanded
(
padding:
EdgeInsets
.
symmetric
(
flex:
3
,
vertical:
3
,
child:
Text
(
),
"Price Details"
,
child:
Row
(
style:
TextStyle
(
crossAxisAlignment:
fontSize:
14
,
CrossAxisAlignment
.
start
,
fontFamily:
"JakartaSemiBold"
,
children:
[
),
Expanded
(
),
flex:
1
,
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Unit Price"
,
"Total Price"
];
final
subHeads
=
[
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
"₹
${productsHistory[lp].totalPrice ?? "-"}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
left
,
textAlign:
heads
[
j
],
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
),
Expanded
(
]
else
...[
flex:
3
,
Expanded
(
child:
InkResponse
(
child:
Text
(
onTap:
()
{
textAlign:
TextAlign
.
right
,
Navigator
.
push
(
subHeads
[
j
]
==
""
context
,
?
"-"
MaterialPageRoute
(
:
subHeads
[
j
],
builder:
style:
TextStyle
(
(
fontSize:
14
,
context
,
color:
Color
(
0xFF818181
),
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
]
else
...[
Expanded
(
flex:
4
,
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
maxLines:
2
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
],
),
],
),
),
],
);
],
}),
),
],
);
),
}),
);
],
},
),
),
]
else
...[
InkResponse
(
onTap:
()
async
{
_showFeedbackSheet
(
context
);
},
child:
Container
(
height:
50
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Center
(
);
child:
Text
(
},
textAlign:
TextAlign
.
right
,
),
"+ Feedback Update"
,
),
style:
TextStyle
(
],
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
///Feedback details
color:
AppColors
.
app_blue
,
Container
(
),
padding:
EdgeInsets
.
only
(
),
left:
10
,
right:
10
,
top:
10
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
"Feedback Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
),
),
),
],
if
(
feedbackHistory
.
isNotEmpty
)
...[
Expanded
(
///PaymentHistory details
child:
InkResponse
(
onTap:
()
async
{
if
(
paymentHistory
.
isNotEmpty
)
...[
_showFeedbackSheet
(
context
);
Container
(
},
padding:
EdgeInsets
.
only
(
child:
Padding
(
left:
10
,
padding:
const
EdgeInsets
.
all
(
8.0
),
right:
10
,
top:
10
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
lef
t
,
textAlign:
TextAlign
.
righ
t
,
"
Payment Details
"
,
"
+ Feedback Update
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
),
],
),
),
],
],
),
),
if
(
feedbackHistory
.
isNotEmpty
)
...[
SizedBox
(
width:
double
.
infinity
,
height:
220
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
),
SizedBox
(
itemCount:
feedbackHistory
.
length
,
width:
double
.
infinity
,
itemBuilder:
(
context
,
lp
)
{
height:
225
,
return
Container
(
child:
ListView
.
builder
(
height:
220
,
physics:
AlwaysScrollableScrollPhysics
(),
width:
shrinkWrap:
true
,
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
scrollDirection:
Axis
.
horizontal
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
),
),
itemCount:
paymentHistory
.
length
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
225
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/order/payment_history_ic.svg"
,
"assets/svg/crm/followup_details_ic.svg"
,
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
6
,
flex:
6
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
CrossAxisAlignment
.
start
,
.
start
,
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
children:
[
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
4
,
Expanded
(
child:
Column
(
flex:
4
,
crossAxisAlignment:
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
CrossAxisAlignment
.
start
,
.
start
,
children:
[
children:
[
Text
(
Text
(
payment
History
[
lp
]
feedback
History
[
lp
]
.
e
name
??
.
e
mployeNaem
??
"-"
,
"-"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
fontSize:
14
,
14
,
color:
color:
AppColors
AppColors
.
semi_black
,
.
semi_black
,
),
),
),
),
Text
(
Text
(
"₹
${payment
History[lp]
feedback
History
[
lp
]
.amount
??
.
createdDatetime
??
"-"}
"
,
"-
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
fontSize:
14
,
14
,
color:
color:
AppColors
AppColors
.
grey_semi
,
.
grey_semi
,
),
),
),
],
),
),
Expanded
(
flex:
2
,
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFF3FFD5
,
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
center
,
"
${feedbackHistory[lp].status ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF586000
,
),
),
]
,
)
,
),
),
),
),
]
,
)
,
),
),
],
],
),
),
],
),
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Feedback"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Feedback"
,
"Attachment"
,
];
final
subHeads
=
[
feedbackHistory
[
lp
].
feedback
??
"-"
,
"View"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
Expanded
(
flex:
2
,
flex:
1
,
child:
Container
(
child:
Text
(
height:
45
,
textAlign:
TextAlign
.
left
,
padding:
heads
[
j
],
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
5
,
fontFamily:
),
"JakartaRegular"
,
decoration:
BoxDecoration
(
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
AppColors
.
processed_bg_color
,
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
),
child:
Center
(
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
flex:
3
,
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
paymentHistory
[
lp
].
approvalStatus
??
"-"
,
textAlign:
textAlign:
TextAlign
.
right
,
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
AppColors
.
app_blue
,
.
processed_text_color
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
),
),
),
]
else
...[
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
child:
Row
(
children:
[
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
child:
Text
(
"Payment Info"
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
maxLines:
2
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
fontFamily:
color:
Color
(
0xFF818181
),
"JakartaSemiBold"
,
),
),
),
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
],
)
,
]
,
),
),
...
List
.
generate
(
3
,
(
j
)
{
);
final
headsa
=
[
}),
"Mode of Payment"
,
],
"Payment Reference"
,
),
"Adjusted Amount"
,
);
"Payment Date"
,
},
];
),
final
subHeadsa
=
[
),
paymentHistory
[
lp
]
]
else
...[
.
paymentType
??
InkResponse
(
"-"
,
paymentHistory
[
lp
]
onTap:
()
async
{
.
refNo
??
_showFeedbackSheet
(
context
);
"-"
,
},
"₹
${paymentHistory[lp]
child:
Container
(
.adjustedAmount ??
height:
50
,
"-"}
"
,
margin:
EdgeInsets
.
symmetric
(
paymentHistory
[
lp
]
horizontal:
10
,
.
paymentDate
??
vertical:
10
,
"-"
,
),
];
decoration:
BoxDecoration
(
return
Container
(
color:
Colors
.
white
,
padding:
EdgeInsets
.
symmetric
(
borderRadius:
BorderRadius
.
circular
(
16
),
vertical:
3
,
),
),
child:
Center
(
child:
Row
(
child:
Text
(
crossAxisAlignment:
textAlign:
TextAlign
.
right
,
CrossAxisAlignment
.
start
,
"+ Feedback Update"
,
children:
[
style:
TextStyle
(
Expanded
(
fontFamily:
"JakartaMedium"
,
child:
Text
(
fontSize:
14
,
textAlign:
TextAlign
.
left
,
color:
AppColors
.
app_blue
,
headsa
[
j
],
),
style:
TextStyle
(
),
fontFamily:
),
"JakartaRegular"
,
),
fontSize:
14
,
),
color:
],
AppColors
.
semi_black
,
///PaymentHistory details
),
),
if
(
paymentHistory
.
isNotEmpty
)
...[
),
Container
(
Expanded
(
padding:
EdgeInsets
.
only
(
child:
Text
(
left:
10
,
textAlign:
right:
10
,
TextAlign
.
right
,
top:
10
,
subHeadsa
[
j
]
==
""
),
?
"-"
child:
Row
(
:
subHeadsa
[
j
],
children:
[
style:
TextStyle
(
Expanded
(
fontSize:
14
,
child:
Text
(
color:
Color
(
textAlign:
TextAlign
.
left
,
0xFF818181
,
"Payment Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
],
),
),
SizedBox
(
width:
double
.
infinity
,
height:
225
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
itemCount:
paymentHistory
.
length
,
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
225
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/order/payment_history_ic.svg"
,
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
6
,
child:
SizedBox
(
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Row
(
children:
[
Expanded
(
flex:
4
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
paymentHistory
[
lp
]
.
ename
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${paymentHistory[lp]
.amount ??
"-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
),
)
,
]
,
),
),
],
],
),
),
);
),
}),
),
Expanded
(
],
flex:
2
,
),
child:
Container
(
);
height:
45
,
},
padding:
),
EdgeInsets
.
symmetric
(
),
horizontal:
5
,
],
),
],
decoration:
BoxDecoration
(
),
color:
],
AppColors
),
.
processed_bg_color
,
),
borderRadius:
bottomNavigationBar:
BorderRadius
.
circular
(
[
"self"
,
"pending_approval"
].
contains
(
widget
.
mode
)
8
,
?
SizedBox
.
shrink
()
),
:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
height:
75
,
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
height:
45
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
if
([
"level_one_approval"
,
"level_two_approval"
,
"level_two_rejected"
,
].
contains
(
widget
.
mode
))
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
_showLevelApprovalRejectionSheet
(
context
,
"Reject"
,
);
},
child:
Container
(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFFFEFEF),
// border: Border.all(
// color: Color(0xFFED3424),
// width: 0.5,
// ),
// ),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_reject_ic.svg"
,
),
),
SizedBox
(
width:
5
,),
child:
Center
(
Center
(
child:
Text
(
child:
Text
(
"Reject"
,
paymentHistory
[
lp
].
approvalStatus
??
"-"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
processed_text_color
,
),
),
),
),
),
),
]
,
)
,
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
child:
Row
(
children:
[
Expanded
(
flex:
4
,
child:
Text
(
"Payment Info"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
),
),
),
...
List
.
generate
(
3
,
(
j
)
{
],
final
headsa
=
[
SizedBox
(
width:
10
),
"Mode of Payment"
,
if
([
"Payment Reference"
,
"level_one_approval"
,
"Adjusted Amount"
,
"level_two_approval"
,
"Payment Date"
,
"level_two_rejected"
,
];
"sales_order_registered"
,
final
subHeadsa
=
[
].
contains
(
widget
.
mode
))
...[
paymentHistory
[
lp
]
SvgPicture
.
asset
(
.
paymentType
??
"assets/svg/crm/vertical_line_ic.svg"
,
"-"
,
paymentHistory
[
lp
]
),
.
refNo
??
SizedBox
(
width:
10
),
"-"
,
Expanded
(
"₹
${paymentHistory[lp]
child:
InkResponse
(
.adjustedAmount ??
onTap:
()
{
"-"}
"
,
// provider
paymentHistory
[
lp
]
// .approveRejectPaymentRequestAPIFunction(
.
paymentDate
??
// context,
"-"
,
// provider.requestsDetails.id,
];
// );
return
Container
(
_showLevelApprovalRejectionSheet
(
padding:
EdgeInsets
.
symmetric
(
context
,
vertical:
3
,
"Approve"
,
),
);
},
child:
Container
(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE7FFE5),
// border: Border.all(
// color: Color(0xFF0D9C00),
// width: 0.5,
// ),
// ),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
SvgPicture
.
asset
(
Expanded
(
"assets/svg/finance/level_approve_ic.svg"
,
),
SizedBox
(
width:
5
,),
Center
(
child:
Text
(
child:
Text
(
"Approve"
,
textAlign:
TextAlign
.
left
,
headsa
[
j
],
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
],
Expanded
(
),
),
),
),
SizedBox
(
width:
10
),
],
if
([
"admin"
].
contains
(
widget
.
mode
))
...[
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
_showLevelDeletionSheet
(
context
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_delete_ic.svg"
),
SizedBox
(
width:
5
,),
Center
(
child:
Text
(
child:
Text
(
"Delete"
,
textAlign:
TextAlign
.
right
,
subHeadsa
[
j
]
==
""
?
"-"
:
subHeadsa
[
j
],
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
],
],
),
),
),
);
}),
],
),
);
},
),
),
],
],
),
],
),
),
bottomNavigationBar:
[
"self"
,
"pending_approval"
].
contains
(
widget
.
mode
)
?
SizedBox
.
shrink
()
:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
height:
75
,
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
height:
45
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
if
([
"level_one_approval"
,
"level_two_approval"
,
"level_two_rejected"
,
].
contains
(
widget
.
mode
))
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
_showLevelApprovalRejectionSheet
(
context
,
"Reject"
,
);
},
child:
Container
(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFFFEFEF),
// border: Border.all(
// color: Color(0xFFED3424),
// width: 0.5,
// ),
// ),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_reject_ic.svg"
,
),
SizedBox
(
width:
5
,),
Center
(
child:
Text
(
"Reject"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
),
),
),
],
),
),
),
),
SizedBox
(
width:
10
),
),
],
),
if
(
widget
.
mode
==
"dispatched"
)
...[
],
SvgPicture
.
asset
(
SizedBox
(
width:
10
),
"assets/svg/crm/vertical_line_ic.svg"
,
if
([
),
"level_one_approval"
,
SizedBox
(
width:
10
),
"level_two_approval"
,
Expanded
(
"level_two_rejected"
,
child:
InkResponse
(
"sales_order_registered"
,
onTap:
()
{
].
contains
(
widget
.
mode
))
...[
disProvider
.
initializeForm
(
context
);
SvgPicture
.
asset
(
disProvider
"assets/svg/crm/vertical_line_ic.svg"
,
.
ordersDetailsDispatchOrderViewFunction
(
),
context
,
SizedBox
(
width:
10
),
widget
.
orderId
,
Expanded
(
);
child:
InkResponse
(
_showDispatchSheet
(
context
,
"Dispatch"
);
onTap:
()
{
},
// provider
child:
Container
(
// .approveRejectPaymentRequestAPIFunction(
decoration:
BoxDecoration
(
// context,
borderRadius:
BorderRadius
.
circular
(
8
),
// provider.requestsDetails.id,
color:
Color
(
0xFFFFEFEF
),
// );
border:
Border
.
all
(
_showLevelApprovalRejectionSheet
(
color:
Color
(
0xFFED3424
),
context
,
width:
0.5
,
"Approve"
,
);
},
child:
Container
(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE7FFE5),
// border: Border.all(
// color: Color(0xFF0D9C00),
// width: 0.5,
// ),
// ),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
,
),
SizedBox
(
width:
5
,),
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
),
),
),
),
),
child:
Row
(
],
mainAxisAlignment:
MainAxisAlignment
.
center
,
),
children:
[
),
Center
(
),
child:
Text
(
),
"Dispatch"
,
SizedBox
(
width:
10
),
style:
TextStyle
(
],
color:
AppColors
.
semi_black
,
fontSize:
14
,
if
(
widget
.
mode
==
"admin"
)
...[
),
SvgPicture
.
asset
(
),
"assets/svg/crm/vertical_line_ic.svg"
,
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
_showLevelDeletionSheet
(
context
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_delete_ic.svg"
),
SizedBox
(
width:
5
,),
Center
(
child:
Text
(
"Delete"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
),
),
]
,
)
,
),
),
],
),
),
),
),
SizedBox
(
width:
10
),
],
if
(
widget
.
mode
==
"dispatched"
)
...[
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
disProvider
.
initializeForm
(
context
);
disProvider
.
ordersDetailsDispatchOrderViewFunction
(
context
,
widget
.
orderId
,
);
_showDispatchSheet
(
context
,
"Dispatch"
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Center
(
child:
Text
(
"Dispatch"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
),
),
),
],
),
),
),
]
,
)
,
]
,
)
,
)
,
]
,
)
,
]
,
),
),
),
),
),
),
onWillPop:
()
{
return
onBackPressed
(
context
);
},
);
);
},
},
);
);
...
...
lib/screens/order/ordersListByModes.dart
View file @
12aa06e4
...
@@ -3,6 +3,7 @@ import 'dart:io';
...
@@ -3,6 +3,7 @@ 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'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
import
'package:generp/screens/order/ordersDetailsByModes.dart'
;
import
'package:generp/screens/order/ordersDetailsByModes.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -228,7 +229,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -228,7 +229,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
itemCount:
ordersList
.
length
,
itemCount:
ordersList
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
ol
)
{
if
(
ordersList
.
isEmpty
)
{
if
(
ordersList
.
isEmpty
)
{
return
SizedBox
(
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
child:
Center
(
child:
Text
(
"No Data Available"
)),
...
@@ -243,12 +244,13 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -243,12 +244,13 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
builder:
builder:
(
context
)
=>
Ordersdetailsbymodes
(
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
index
].
orderId
,
orderId:
ordersList
[
ol
].
orderId
,
mode:
widget
.
mode
,
mode:
widget
.
mode
,
),
),
settings:
RouteSettings
(
name:
"Ordersdetailsbymodes"
)
),
),
);
);
if
(
r
es
==
true
)
{
if
(
r
outeSettingName
==
"Ordersdetailsbymodes"
)
{
provider
.
ordersListByModeFilterAPIFunction
(
provider
.
ordersListByModeFilterAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
...
@@ -303,21 +305,21 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -303,21 +305,21 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
padding:
EdgeInsets
.
all
(
8.0
),
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
getDecorationColor
(
color:
getDecorationColor
(
ordersList
[
index
].
status
,
ordersList
[
ol
].
status
,
),
),
shape:
BoxShape
.
circle
,
shape:
BoxShape
.
circle
,
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
getText
(
getText
(
ordersList
[
index
].
status
,
ordersList
[
ol
].
status
,
),
),
style:
TextStyle
(
style:
TextStyle
(
color:
getTextColor
(
color:
getTextColor
(
ordersList
[
index
].
status
,
ordersList
[
ol
].
status
,
),
),
fontSize:
getSize
(
fontSize:
getSize
(
ordersList
[
index
].
status
,
ordersList
[
ol
].
status
,
),
),
fontFamily:
"JakartaBold"
,
fontFamily:
"JakartaBold"
,
),
),
...
@@ -334,7 +336,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -334,7 +336,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
ordersList
[
index
]
ordersList
[
ol
]
.
accountName
!,
.
accountName
!,
maxLines:
1
,
maxLines:
1
,
overflow:
overflow:
...
@@ -347,7 +349,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -347,7 +349,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
),
),
),
),
Text
(
Text
(
ordersList
[
index
]
ordersList
[
ol
]
.
orderNumber
!,
.
orderNumber
!,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
...
@@ -370,7 +372,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
...
@@ -370,7 +372,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
child:
Container
(
child:
Container
(
child:
Text
(
child:
Text
(
"₹"
"₹"
"
${ordersList[
index
].balanceAmount}
"
,
"
${ordersList[
ol
].balanceAmount}
"
,
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
...
...
lib/screens/order/tpcAgentDetailsByMode.dart
View file @
12aa06e4
...
@@ -46,6 +46,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
...
@@ -46,6 +46,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
);
provider
.
TPCAgentsDetailsAPIFunction
(
context
,
widget
.
tpcAgentId
);
provider
.
TPCAgentsDetailsAPIFunction
(
context
,
widget
.
tpcAgentId
);
provider
.
showMoreDetails
=
false
;
});
});
}
}
...
@@ -128,612 +129,601 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
...
@@ -128,612 +129,601 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
"subHeadings"
:
subHeadings2
,
"subHeadings"
:
subHeadings2
,
},
},
];
];
return
WillPopScope
(
return
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2New
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2New
(
SizedBox
(
width:
0
),
context
,
0xFFFFFFFF
,
widget
.
pageTitleName
,
),
provider
.
resetAll
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
SizedBox
(
width:
0
),
body:
SingleChildScrollView
(
0xFFFFFFFF
,
child:
Column
(
),
children:
[
backgroundColor:
AppColors
.
scaffold_bg_color
,
Card
(
body:
SingleChildScrollView
(
shape:
RoundedRectangleBorder
(
child:
Column
(
borderRadius:
BorderRadius
.
only
(
children:
[
bottomLeft:
Radius
.
circular
(
30
),
Card
(
bottomRight:
Radius
.
circular
(
30
),
shape:
RoundedRectangleBorder
(
),
borderRadius:
BorderRadius
.
only
(
),
bottomLeft:
Radius
.
circular
(
30
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
bottomRight:
Radius
.
circular
(
30
),
elevation:
2
,
),
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
elevation:
2
,
child:
Column
(
child:
Column
(
children:
[
children:
[
Container
(
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
vertical
(
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
bottom:
Radius
.
circular
(
30
),
),
),
),
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
vertical:
10
,
horizontal:
10
,
horizontal:
10
,
),
),
child:
Column
(
child:
Column
(
children:
[
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
child:
SvgPicture
.
asset
(
width:
35
,
"assets/svg/crm/lead_details_ic.svg"
,
child:
SvgPicture
.
asset
(
),
"assets/svg/crm/lead_details_ic.svg"
,
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
all
(
1
),
child:
Text
(
tpcAgentDetails
.
name
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentDetails.mobileNumber}
'
,
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
3.0
,
),
child:
Text
(
tpcAgentDetails
.
mobileNumber
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
grey_semi
,
),
),
),
),
],
),
),
SizedBox
(
width:
10
),
),
Expanded
(
),
flex:
5
,
SizedBox
(
width:
10
),
child:
SizedBox
(
],
child:
Column
(
),
crossAxisAlignment:
SizedBox
(
height:
5
),
CrossAxisAlignment
.
start
,
Visibility
(
visible:
provider
.
showMoreDetails
?
true
:
false
,
child:
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
,
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
children:
[
Padding
(
Expanded
(
padding:
const
EdgeInsets
.
all
(
1
)
,
flex:
3
,
child:
Text
(
child:
Text
(
t
pcAgentDetails
.
name
??
"-"
,
t
itle
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
),
),
),
InkResponse
(
Expanded
(
onTap:
()
{
flex:
6
,
launch
(
child:
DottedLine
(
'tel://
${tpcAgentDetails.mobileNumber}
'
,
dashGapLength:
4
,
);
dashGapColor:
Colors
.
white
,
},
dashColor:
child:
Padding
(
AppColors
.
grey_semi
,
padding:
dashLength:
2
,
const
EdgeInsets
.
symmetric
(
lineThickness:
0.5
,
vertical:
3.0
,
),
child:
Text
(
tpcAgentDetails
.
mobileNumber
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
grey_semi
,
),
),
),
),
),
),
],
],
),
),
),
),
),
SizedBox
(
width:
10
),
],
),
SizedBox
(
height:
5
),
Visibility
(
visible:
provider
.
showMoreDetails
?
true
:
false
,
child:
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
,
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
Column
(
crossAxisAlignment:
children:
List
.
generate
(
headings
.
length
,
(
CrossAxisAlignment
.
start
,
j
,
children:
[
)
{
Container
(
if
(
headings
[
j
]
==
"ID Proof"
&&
tpcAgentDetails
.
idProofDirFilePath
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
vertical:
7
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
3
,
child:
Text
(
child:
Text
(
title
,
headings
[
j
]
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontFamily:
fontFamily:
"JakartaSemiBold"
,
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
6
,
child:
InkResponse
(
child:
DottedLine
(
onTap:
dashGapLength:
4
,
subHeadings
[
j
]
==
dashGapColor:
Colors
.
white
,
"View"
dashColor:
?
()
{
AppColors
.
grey_semi
,
Navigator
.
push
(
dashLength:
2
,
context
,
lineThickness:
0.5
,
MaterialPageRoute
(
),
builder:
),
(
],
context
,
),
)
=>
Fileviewer
(
),
fileName:
tpcAgentDetails
.
idProofViewFileName
??
Column
(
""
,
children:
List
.
generate
(
headings
.
length
,
(
fileUrl:
j
,
tpcAgentDetails
.
idProofDirFilePath
??
)
{
""
,
if
(
headings
[
j
]
==
"ID Proof"
&&
),
tpcAgentDetails
),
.
idProofDirFilePath
!
);
.
trim
()
}
.
isEmpty
)
{
:
null
,
return
SizedBox
.
shrink
();
child:
Text
(
}
subHeadings
[
j
].
isEmpty
return
Container
(
?
"-"
padding:
EdgeInsets
.
symmetric
(
:
subHeadings
[
j
],
vertical:
7
,
style:
TextStyle
(
),
fontSize:
14
,
child:
Row
(
decoration:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
subHeadings
[
j
]
==
subHeadings
[
j
]
==
"View"
"View"
?
()
{
?
TextDecoration
Navigator
.
push
(
.
underline
context
,
:
TextDecoration
MaterialPageRoute
(
.
none
,
builder:
decorationStyle:
(
TextDecorationStyle
context
,
.
dashed
,
)
=>
Fileviewer
(
decorationColor:
fileName:
subHeadings
[
j
]
==
tpcAgentDetails
.
idProofViewFileName
??
"View"
""
,
?
AppColors
fileUrl:
.
app_blue
tpcAgentDetails
.
idProofDirFilePath
??
:
Color
(
""
,
0xFF818181
,
),
),
),
color:
);
subHeadings
[
j
]
==
}
"View"
:
null
,
?
AppColors
child:
Text
(
.
app_blue
subHeadings
[
j
].
isEmpty
:
Color
(
?
"-"
0xFF818181
,
:
subHeadings
[
j
],
),
style:
TextStyle
(
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
]
,
)
,
),
),
);
],
}),
),
),
);
],
}),
);
),
}),
],
),
);
),
}),
),
),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
provider
.
showMoreDetails
=
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
!
provider
.
showMoreDetails
;
},
},
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
center
,
CrossAxisAlignment
.
center
,
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
center
,
MainAxisAlignment
.
center
,
children:
[
children:
[
Text
(
Text
(
provider
.
showMoreDetails
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
provider
.
showMoreDetails
?
"Hide Details"
?
true
:
"View Details"
,
:
false
,
style:
TextStyle
(
child:
SvgPicture
.
asset
(
fontFamily:
"JakartaMedium"
,
"assets/svg/arrow_dropdown.svg"
,
fontSize:
14
,
height:
25
,
color:
AppColors
.
app_blue
,
width:
20
,
),
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
)
,
]
,
),
),
]
,
)
,
),
),
),
],
],
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
top:
15
,
left:
10
,
),
child:
Text
(
"TPC Amounts Requested"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_thick
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
],
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
top:
15
,
left:
10
,
),
child:
Text
(
"TPC Amounts Requested"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_thick
,
fontFamily:
"JakartaMedium"
,
),
),
ListView
.
builder
(
),
scrollDirection:
Axis
.
vertical
,
),
shrinkWrap:
true
,
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
scrollDirection:
Axis
.
vertical
,
itemCount:
tpcReqAmt
.
length
,
shrinkWrap:
true
,
padding:
EdgeInsets
.
symmetric
(
physics:
NeverScrollableScrollPhysics
(),
horizontal:
10
,
itemCount:
tpcReqAmt
.
length
,
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
(
context
,
context
,
)
=>
Ordersdetailsbymodes
(
)
=>
Ordersdetailsbymodes
(
pageTitleName:
pageTitleName:
"CRM Order Details"
,
"CRM Order Details"
,
mode:
widget
.
mode
,
mode:
widget
.
mode
,
orderId:
orderId:
tpcReqAmt
[
index
]
tpcReqAmt
[
index
]
.
orderId
,
.
orderId
,
),
),
);
},
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
),
),
);
},
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
child:
Column
(
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
mainAxisAlignment:
flex:
1
,
MainAxisAlignment
.
start
,
child:
SvgPicture
.
asset
(
crossAxisAlignment:
"assets/svg/order/tpc_details_req_ic.svg"
,
CrossAxisAlignment
.
start
,
),
children:
[
),
Expanded
(
SizedBox
(
width:
10
),
flex:
1
,
Expanded
(
child:
SvgPicture
.
asset
(
flex:
6
,
"assets/svg/order/tpc_details_req_ic.svg"
,
child:
SizedBox
(
),
child:
Column
(
),
// mainAxisAlignment: MainAxisAlignment.start,
SizedBox
(
width:
10
),
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
flex:
6
,
.
start
,
child:
SizedBox
(
mainAxisAlignment:
child:
Column
(
MainAxisAlignment
.
start
,
// mainAxisAlignment: MainAxisAlignment.start,
children:
[
crossAxisAlignment:
Row
(
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
4
,
Expanded
(
child:
Column
(
flex:
4
,
crossAxisAlignment:
child:
Column
(
CrossAxisAlignment
crossAxisAlignment:
.
start
,
CrossAxisAlignment
children:
[
.
start
,
InkResponse
(
children:
[
onTap:
()
{
InkResponse
(
Navigator
.
push
(
onTap:
()
{
context
,
Navigator
.
push
(
MaterialPageRoute
(
context
,
builder:
MaterialPageRoute
(
(
builder:
context
,
(
)
=>
Ordersdetailsbymodes
(
context
,
pageTitleName:
)
=>
Ordersdetailsbymodes
(
"CRM Order Details"
,
pageTitleName:
mode:
widget
.
mode
,
"CRM Order Details"
,
orderId:
mode:
widget
.
mode
,
tpcReqAmt
[
index
]
orderId:
.
orderId
,
tpcReqAmt
[
index
]
.
orderId
,
),
),
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Text
(
tpcReqAmt
[
index
].
customerName
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
semi_black
,
height:
1.5
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
);
Text
(
},
tpcReqAmt
[
index
].
orderNumber
??
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Text
(
tpcReqAmt
[
index
].
customerName
??
"-"
,
"-"
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
semi_black
,
height:
1.5
,
fontFamily:
fontFamily:
"JakartaRegular"
,
"JakartaRegular"
,
fontSize:
fontSize:
14
,
14
,
color:
color:
AppColors
AppColors
.
grey_semi
,
.
semi_black
,
),
),
),
),
],
),
),
Expanded
(
flex:
2
,
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
AppColors
.
requested_bg_color
,
),
),
padding:
),
EdgeInsets
.
symmetric
(
Text
(
horizontal:
tpcReqAmt
[
index
].
orderNumber
??
5
,
"-"
,
vertical:
style:
TextStyle
(
10
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
child:
Center
(
),
child:
Text
(
],
textAlign:
),
TextAlign
),
.
right
,
Expanded
(
"
${tpcReqAmt[index].tpcStatus ?? "-"}
"
,
flex:
2
,
style:
TextStyle
(
child:
Container
(
fontFamily:
decoration:
"JakartaMedium"
,
BoxDecoration
(
fontSize:
borderRadius:
14
,
BorderRadius
.
circular
(
color:
AppColors
.
app_blue
,
8
,
),
),
),
color:
AppColors
.
requested_bg_color
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
right
,
"
${tpcReqAmt[index].tpcStatus ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
]
,
)
,
),
),
],
],
),
),
)
,
]
,
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
),
child:
Row
(
),
children:
[
],
Expanded
(
),
flex:
4
,
Container
(
child:
Text
(
padding:
EdgeInsets
.
symmetric
(
"Order Details"
,
vertical:
7.5
,
style:
TextStyle
(
),
fontSize:
14
,
child:
Row
(
fontFamily:
children:
[
"JakartaSemiBold"
,
Expanded
(
),
flex:
4
,
),
child:
Text
(
),
"Order Details"
,
Expanded
(
style:
TextStyle
(
flex:
6
,
fontSize:
14
,
child:
DottedLine
(
fontFamily:
dashGapLength:
4
,
"JakartaSemiBold"
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
),
]
,
)
,
),
),
),
Expanded
(
...
List
.
generate
(
2
,
(
j
)
{
flex:
6
,
final
heads
=
[
child:
DottedLine
(
"Order Amount"
,
dashGapLength:
4
,
"Level 2 Approved Amount"
,
dashGapColor:
Colors
.
white
,
];
dashColor:
final
subHeads
=
[
AppColors
.
grey_semi
,
"
${tpcReqAmt[index].totalAmount}
"
,
dashLength:
2
,
"
${tpcReqAmt[index].level2TpcApprovedAmount}
"
,
lineThickness:
0.5
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
),
child:
Row
(
),
crossAxisAlignment:
],
CrossAxisAlignment
.
start
,
),
children:
[
),
Expanded
(
...
List
.
generate
(
2
,
(
j
)
{
child:
Text
(
final
heads
=
[
textAlign:
TextAlign
.
left
,
"Order Amount"
,
heads
[
j
],
"Level 2 Approved Amount"
,
style:
TextStyle
(
];
fontFamily:
final
subHeads
=
[
"JakartaRegular"
,
"
${tpcReqAmt[index].totalAmount}
"
,
fontSize:
14
,
"
${tpcReqAmt[index].level2TpcApprovedAmount}
"
,
color:
];
AppColors
return
Container
(
.
semi_black
,
padding:
EdgeInsets
.
symmetric
(
),
vertical:
3
,
),
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Expanded
(
),
child:
Text
(
),
textAlign:
Expanded
(
TextAlign
.
right
,
child:
Text
(
subHeads
[
j
]
==
""
textAlign:
?
"-"
TextAlign
.
right
,
:
subHeads
[
j
]
,
subHeads
[
j
]
==
""
style:
TextStyle
(
?
"-"
fontSize:
14
,
:
subHeads
[
j
]
,
color:
Color
(
style:
TextStyle
(
0xFF818181
,
fontSize:
14
,
),
color:
Color
(
)
,
0xFF818181
,
),
),
),
),
]
,
)
,
),
),
);
],
}),
),
);
],
}),
),
),
);
},
),
],
],
),
),
);
},
),
),
),
],
),
),
),
),
onWillPop:
()
{
return
onBackPressed
(
context
);
},
);
);
},
},
);
);
...
@@ -825,6 +815,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
...
@@ -825,6 +815,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
),
),
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
(
...
...
lib/screens/order/tpcAgentIssueList.dart
View file @
12aa06e4
...
@@ -69,7 +69,7 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
...
@@ -69,7 +69,7 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
?
Platform
.
isAndroid
?
Platform
.
isAndroid
?
WillPopScope
(
?
WillPopScope
(
onWillPop:
()
{
onWillPop:
()
{
Provider
.
of
<
Tpcagentsprovider
>(
context
).
resetAll
();
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
).
resetAll
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
SafeArea
(
child:
SafeArea
(
...
@@ -87,165 +87,155 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
...
@@ -87,165 +87,155 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
return
Consumer
<
Tpcagentsprovider
>(
return
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
final
tpcAgentsIssueList
=
provider
.
tpcAgentsIssueList
;
final
tpcAgentsIssueList
=
provider
.
tpcAgentsIssueList
;
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
{
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
();
appBar:
appbar2New
(
return
onBackPressed
(
context
);
context
,
},
widget
.
pageTitleName
,
child:
SafeArea
(
provider
.
resetAll
,
top:
false
,
Row
(
bottom:
Platform
.
isIOS
?
false
:
true
,
children:
[
child:
Scaffold
(
// InkResponse(
resizeToAvoidBottomInset:
true
,
// onTap: () {
appBar:
appbar2New
(
// // _showOptionsSheet(context);
context
,
// },
widget
.
pageTitleName
,
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
provider
.
resetAll
,
// ),
Row
(
children:
[
// InkResponse(
// onTap: () {
// // _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
],
),
),
0xFFFFFFFF
0xFFFFFFFF
),
),
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
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
(
context
)
=>
Tpcagentissuelistdetails
(
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
mode:
widget
.
mode
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
),
),
),
),
);
);
},
},
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
horizontal:
7.5
,
vertical:
5
,
vertical:
5
,
),
),
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
5
,
vertical:
5
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
child:
Column
(
children:
[
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
width:
35
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/order/tpc_list_ic.svg"
,
"assets/svg/order/tpc_list_ic.svg"
,
),
),
),
),
SizedBox
(
width:
10
),
),
Expanded
(
),
flex:
4
,
SizedBox
(
width:
10
),
child:
SizedBox
(
Expanded
(
child:
Column
(
flex:
4
,
crossAxisAlignment:
child:
SizedBox
(
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
Text
(
CrossAxisAlignment
.
start
,
tpcAgentsIssueList
[
index
].
name
!,
children:
[
style:
TextStyle
(
Text
(
fontFamily:
tpcAgentsIssueList
[
index
].
name
!,
"JakartaRegular"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
color:
"JakartaRegular"
,
AppColors
.
semi_black
,
fontSize:
14
,
),
color:
),
AppColors
.
semi_black
,
Text
(
),
"
${tpcAgentsIssueList[index].aname}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
Text
(
),
SizedBox
(
width:
10
),
"
${tpcAgentsIssueList[index].aname}
"
,
Expanded
(
style:
TextStyle
(
flex:
1
,
fontFamily:
child:
InkResponse
(
"JakartaRegular"
,
onTap:
()
{
fontSize:
14
,
launch
(
color:
AppColors
.
grey_semi
,
'tel://
${tpcAgentsIssueList[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
),
),
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsIssueList[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
),
),
),
),
]
,
)
,
),
),
],
],
),
),
),
);
},
],
),
),
],
),
);
},
),
),
)
:
Emptywidget
(
context
)
,
]
,
),
),
),
)
:
Emptywidget
(
context
)
,
);
);
},
},
);
);
...
...
lib/screens/order/tpcAgentIssueListDetails.dart
View file @
12aa06e4
...
@@ -351,1355 +351,1348 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
...
@@ -351,1355 +351,1348 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
],
],
];
];
return
WillPopScope
(
return
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2New
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
bottom:
Platform
.
isIOS
?
false
:
true
,
SizedBox
.
shrink
(),
child:
Scaffold
(
0xFFFFFFFF
),
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2New
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
body:
SingleChildScrollView
(
SizedBox
.
shrink
(),
child:
Column
(
0xFFFFFFFF
),
children:
[
backgroundColor:
AppColors
.
scaffold_bg_color
,
Card
(
body:
SingleChildScrollView
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
2
),
child:
Column
(
shape:
RoundedRectangleBorder
(
children:
[
borderRadius:
BorderRadius
.
only
(
Card
(
bottomLeft:
Radius
.
circular
(
30
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
2
),
bottomRight:
Radius
.
circular
(
30
),
shape:
RoundedRectangleBorder
(
),
borderRadius:
BorderRadius
.
only
(
),
bottomLeft:
Radius
.
circular
(
30
),
elevation:
2
,
bottomRight:
Radius
.
circular
(
30
),
child:
Container
(
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
),
elevation:
2
,
),
child:
Container
(
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
color:
Colors
.
white
,
vertical:
10
,
borderRadius:
BorderRadius
.
only
(
horizontal:
10
,
bottomLeft:
Radius
.
circular
(
30
),
),
bottomRight:
Radius
.
circular
(
30
),
child:
Column
(
),
children:
[
),
Row
(
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
child:
Column
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
45
,
child:
Container
(
width:
45
,
height:
45
,
padding:
EdgeInsets
.
all
(
7.5
),
width:
45
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
7.5
),
color:
Color
(
0xFFE6F6FF
),
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Color
(
0xFFE6F6FF
),
// borderRadius: BorderRadius.circular(8),
shape:
BoxShape
.
circle
,
// borderRadius: BorderRadius.circular(8),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
),
SizedBox
(
width:
10
),
child:
SvgPicture
.
asset
(
Expanded
(
"assets/svg/fin_ic.svg"
,
flex:
4
,
),
child:
SizedBox
(
),
child:
Column
(
),
crossAxisAlignment:
SizedBox
(
width:
10
),
CrossAxisAlignment
.
start
,
Expanded
(
children:
[
flex:
4
,
InkResponse
(
child:
SizedBox
(
onTap:
()
{},
child:
Column
(
child:
Padding
(
crossAxisAlignment:
padding:
const
EdgeInsets
.
only
(
CrossAxisAlignment
.
start
,
top:
8.0
,
children:
[
bottom:
4
,
InkResponse
(
),
onTap:
()
{},
child:
Text
(
child:
Padding
(
orderDetails
.
accountName
==
""
padding:
const
EdgeInsets
.
only
(
?
"-"
top:
8.0
,
:
orderDetails
.
accountName
??
bottom:
4
,
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
height:
1.2
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
Text
(
child:
Text
(
orderDetails
.
balanceAmount
==
""
orderDetails
.
accountName
==
""
?
"-"
?
"-"
:
"₹
${orderDetails.balanceAmount}
"
,
:
orderDetails
.
accountName
??
"-"
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
height:
1.2
,
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
]
,
)
,
),
),
),
Text
(
orderDetails
.
balanceAmount
==
""
?
"-"
:
"₹
${orderDetails.balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
horizontal:
5
,
vertical:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
getDecorationColor
(
color:
getDecorationColor
(
orderDetails
.
status
??
"-"
,
orderDetails
.
status
??
"-"
,
),
),
child:
Center
(
child:
Text
(
orderDetails
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
getTextColor
(
orderDetails
.
status
,
),
),
),
),
child:
Center
(
),
child:
Text
(
),
orderDetails
.
status
??
"-"
,
),
textAlign:
TextAlign
.
center
,
),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
],
fontSize:
14
,
),
color:
getTextColor
(
SizedBox
(
height:
10
),
orderDetails
.
status
,
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
,
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
),
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
),
),
],
Column
(
),
children:
List
.
generate
(
headings
.
length
,
(
SizedBox
(
height:
10
),
j
,
Column
(
)
{
children:
List
.
generate
(
sections
.
length
,
(
return
Container
(
sectionIndex
,
)
{
final
section
=
sections
[
sectionIndex
];
final
title
=
section
[
"title"
]
as
String
;
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
vertical:
7
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
flex:
3
,
child:
Text
(
child:
Text
(
title
,
headings
[
j
]
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
6
,
child:
InkResponse
(
child:
DottedLine
(
onTap:
dashGapLength:
4
,
subHeadings
[
j
]
==
"View"
dashGapColor:
Colors
.
white
,
?
()
{}
dashColor:
AppColors
.
grey_semi
,
:
null
,
dashLength:
2
,
child:
Text
(
lineThickness:
0.5
,
subHeadings
[
j
].
isEmpty
),
?
"-"
)
,
:
subHeadings
[
j
]
,
]
,
textAlign:
TextAlign
.
right
,
),
style:
TextStyle
(
)
,
fontSize:
14
,
Column
(
decoration:
children:
List
.
generate
(
headings
.
length
,
(
subHeadings
[
j
]
==
j
,
"View"
)
{
?
TextDecoration
return
Container
(
.
underline
padding:
EdgeInsets
.
symmetric
(
:
TextDecoration
vertical:
7
,
.
none
,
),
decorationColor:
child:
Row
(
AppColors
.
app_blue
,
crossAxisAlignment:
color:
CrossAxisAlignment
.
start
,
subHeadings
[
j
]
==
children:
[
"View"
Expanded
(
?
AppColors
child:
Text
(
.
app_blue
headings
[
j
],
:
Color
(
style:
TextStyle
(
0xFF818181
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
subHeadings
[
j
]
==
"View"
?
()
{}
:
null
,
child:
Text
(
subHeadings
[
j
].
isEmpty
?
"-"
:
subHeadings
[
j
],
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
),
]
,
)
,
),
),
);
],
}),
),
],
);
}),
),
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
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
)
,
)
;
]
,
})
,
),
),
),
],
),
);
SizedBox
(
height:
10
),
}),
],
),
),
),
),
Column
(
InkResponse
(
children:
[
onTap:
()
async
{
///product details
provider
.
showMoreDetails
=
if
(
productsHistory
.
isNotEmpty
)
...[
!
provider
.
showMoreDetails
;
Container
(
},
padding:
EdgeInsets
.
only
(
child:
Container
(
left:
10
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
right:
10
,
top:
10
,
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
Text
(
child:
Text
(
provider
.
showMoreDetails
textAlign:
TextAlign
.
left
,
?
"Hide Details"
"Product Details"
,
:
"View Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
color:
AppColors
.
app_blue
,
),
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
),
),
],
],
),
),
),
),
),
SizedBox
(
height:
10
),
],
),
),
),
Column
(
children:
[
///product details
if
(
productsHistory
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
"Product Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
],
),
),
SizedBox
(
SizedBox
(
width:
double
.
infinity
,
width:
double
.
infinity
,
height:
300
,
height:
260
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
),
itemCount:
productsHistory
.
length
,
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
260
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
10
,
horizontal:
10
,
vertical:
8
,
),
),
itemCount:
productsHistory
.
length
,
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
300
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
horizontal:
5
,
// vertical: 10,
// vertical: 10,
),
),
child:
Column
(
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
flex:
1
,
crossAxisAlignment:
child:
SvgPicture
.
asset
(
CrossAxisAlignment
.
start
,
"assets/svg/crm/product_details_ic.svg"
,
children:
[
),
Expanded
(
),
flex:
1
,
SizedBox
(
width:
10
),
child:
SvgPicture
.
asset
(
Expanded
(
"assets/svg/crm/product_details_ic.svg"
,
flex:
6
,
),
child:
SizedBox
(
),
child:
Column
(
SizedBox
(
width:
10
),
// mainAxisAlignment: MainAxisAlignment.start,
Expanded
(
crossAxisAlignment:
flex:
6
,
CrossAxisAlignment
.
start
,
child:
SizedBox
(
mainAxisAlignment:
child:
Column
(
MainAxisAlignment
.
start
,
// mainAxisAlignment: MainAxisAlignment.start,
children:
[
crossAxisAlignment:
Row
(
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
4
,
Expanded
(
child:
Text
(
flex:
4
,
productsHistory
[
lp
]
child:
Text
(
.
productName
??
productsHistory
[
lp
]
"-"
,
.
productName
??
maxLines:
2
,
"-"
,
overflow:
maxLines:
2
,
TextOverflow
.
ellipsis
,
overflow:
style:
TextStyle
(
TextOverflow
.
ellipsis
,
fontFamily:
style:
TextStyle
(
"JakartaMedium"
,
fontFamily:
fontSize:
14
,
"JakartaMedium"
,
color:
fontSize:
14
,
AppColors
color:
.
semi_black
,
AppColors
.
semi_black
,
),
),
),
),
Expanded
(
),
flex:
2
,
child:
Text
(
textAlign:
TextAlign
.
right
,
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
),
),
Text
(
Expanded
(
"x
${productsHistory[lp].qty ?? "-"}
"
,
flex:
3
,
style:
TextStyle
(
child:
Text
(
fontFamily:
"JakartaMedium"
,
textAlign:
fontSize:
14
,
TextAlign
.
right
,
color:
AppColors
.
grey_semi
,
"₹
${productsHistory[lp].totalPrice ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
SizedBox
(
height:
5
),
// DottedLine(
// dashGapLength: 4,
// dashGapColor: Colors.white,
// dashColor: AppColors.grey_semi,
// dashLength: 2,
// lineThickness: 0.5,
// ),
// SizedBox(height: 5),
// Text(
// "₹${productsHistory[lp].totalPrice ?? " - "}",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
],
],
),
),
),
Text
(
),
"x
${productsHistory[lp].qty ?? "-"}
"
,
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Tax Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
grey_semi
,
),
),
),
),
// DottedLine(
// dashGapLength: 4,
// dashGapColor: Colors.white,
// dashColor: AppColors.grey_semi,
// dashLength: 2,
// lineThickness: 0.5,
// ),
// SizedBox(height: 5),
// Text(
// "₹${productsHistory[lp].totalPrice ?? " - "}",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
],
),
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Tax Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
Expanded
(
),
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
3
,
(
j
)
{
final
heads
=
[
"CGST (%)"
,
"SGST (%)"
,
"IGST (%)"
,
];
final
subHeads
=
[
productsHistory
[
lp
].
cgstPercentage
??
"-"
,
productsHistory
[
lp
].
sgstPercentage
??
"-"
,
productsHistory
[
lp
].
igstPercentage
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
),
...
List
.
generate
(
3
,
(
j
)
{
child:
Row
(
final
heads
=
[
crossAxisAlignment:
"CGST (%)"
,
CrossAxisAlignment
.
start
,
"SGST (%)"
,
children:
[
"IGST (%)"
,
Expanded
(
];
child:
Text
(
final
subHeads
=
[
textAlign:
TextAlign
.
left
,
productsHistory
[
lp
].
cgstPercentage
??
"-"
,
heads
[
j
],
productsHistory
[
lp
].
sgstPercentage
??
"-"
,
style:
TextStyle
(
productsHistory
[
lp
].
igstPercentage
??
"-"
,
fontFamily:
];
"JakartaRegular"
,
return
Container
(
fontSize:
14
,
padding:
EdgeInsets
.
symmetric
(
color:
AppColors
.
semi_black
,
vertical:
3
,
),
),
),
),
child:
Row
(
if
(
subHeads
[
j
]
==
"View"
)
...[
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
.
start
,
child:
InkResponse
(
children:
[
onTap:
()
{
Expanded
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
left
,
textAlign:
heads
[
j
],
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
),
Expanded
(
]
else
...[
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
]
else
...[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
],
),
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
Expanded
(
flex:
3
,
child:
Text
(
child:
Text
(
"Price Details"
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
color:
Color
(
0xFF818181
)
,
),
),
),
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
],
],
),
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Price Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
1
,
(
j
)
{
final
heads
=
[
// "Unit Price",
"Total Price"
];
final
subHeads
=
[
// "₹ ${productsHistory[lp].unitPrice ?? "-"}",
"₹
${productsHistory[lp].totalPrice ?? "-"}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
),
...
List
.
generate
(
2
,
(
j
)
{
child:
Row
(
final
heads
=
[
crossAxisAlignment:
"Unit Price"
,
CrossAxisAlignment
.
start
,
"Total Price"
children:
[
];
Expanded
(
final
subHeads
=
[
child:
Text
(
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
textAlign:
TextAlign
.
left
,
"₹
${productsHistory[lp].totalPrice ?? "-"}
"
,
heads
[
j
],
];
style:
TextStyle
(
return
Container
(
fontFamily:
padding:
EdgeInsets
.
symmetric
(
"JakartaRegular"
,
vertical:
3
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
child:
Row
(
if
(
subHeads
[
j
]
==
"View"
)
...[
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
.
start
,
child:
InkResponse
(
children:
[
onTap:
()
{
Expanded
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
left
,
textAlign:
heads
[
j
],
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
),
Expanded
(
]
else
...[
child:
InkResponse
(
Expanded
(
onTap:
()
{
child:
Text
(
Navigator
.
push
(
textAlign:
TextAlign
.
right
,
context
,
subHeads
[
j
]
==
""
MaterialPageRoute
(
?
"-"
builder:
:
subHeads
[
j
],
(
style:
TextStyle
(
context
,
fontSize:
14
,
)
=>
Fileviewer
(
color:
Color
(
0xFF818181
),
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
]
else
...[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
],
),
],
),
),
],
);
],
}),
),
],
);
),
}),
);
],
},
),
),
);
),
},
],
),
),
],
///Feedback details
///Feedback details
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
10
,
left:
10
,
right:
10
,
right:
10
,
top:
10
,
top:
10
,
),
),
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
"Feedback Details"
,
"Feedback Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
color:
AppColors
.
grey_thick
,
),
),
),
),
if
(
feedbackHistory
.
isNotEmpty
)
...[
),
Expanded
(
),
child:
InkResponse
(
if
(
feedbackHistory
.
isNotEmpty
)
...[
onTap:
()
async
{
Expanded
(
_showFeedbackSheet
(
context
);
child:
InkResponse
(
},
onTap:
()
async
{
child:
Padding
(
_showFeedbackSheet
(
context
);
padding:
const
EdgeInsets
.
all
(
8.0
)
,
}
,
child:
Text
(
child:
Padding
(
textAlign:
TextAlign
.
right
,
padding:
const
EdgeInsets
.
all
(
8.0
)
,
"+ Feedback Update"
,
child:
Text
(
style:
TextStyle
(
textAlign:
TextAlign
.
right
,
fontFamily:
"JakartaMedium
"
,
"+ Feedback Update
"
,
fontSize:
14
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
,
)
,
fontSize:
14
,
)
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
],
),
],
),
],
],
),
),
if
(
feedbackHistory
.
isNotEmpty
)
...[
SizedBox
(
width:
double
.
infinity
,
height:
220
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
),
),
itemCount:
feedbackHistory
.
length
,
if
(
feedbackHistory
.
isNotEmpty
)
...[
itemBuilder:
(
context
,
lp
)
{
SizedBox
(
return
Container
(
width:
double
.
infinity
,
height:
220
,
height:
220
,
width:
child:
ListView
.
builder
(
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
physics:
AlwaysScrollableScrollPhysics
(),
decoration:
BoxDecoration
(
shrinkWrap:
true
,
color:
Colors
.
white
,
scrollDirection:
Axis
.
horizontal
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
),
),
itemCount:
feedbackHistory
.
length
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
220
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
mainAxisAlignment:
flex:
1
,
MainAxisAlignment
.
start
,
child:
SvgPicture
.
asset
(
crossAxisAlignment:
"assets/svg/crm/followup_details_ic.svg"
,
CrossAxisAlignment
.
start
,
),
children:
[
),
Expanded
(
SizedBox
(
width:
10
),
flex:
1
,
Expanded
(
child:
SvgPicture
.
asset
(
flex:
6
,
"assets/svg/crm/followup_details_ic.svg"
,
child:
SizedBox
(
),
child:
Column
(
),
// mainAxisAlignment: MainAxisAlignment.start,
SizedBox
(
width:
10
),
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
.
start
,
flex:
6
,
mainAxisAlignment:
child:
SizedBox
(
MainAxisAlignment
.
start
,
child:
Column
(
children:
[
// mainAxisAlignment: MainAxisAlignment.start,
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
4
,
Expanded
(
child:
Column
(
flex:
4
,
crossAxisAlignment:
child:
Column
(
CrossAxisAlignment
crossAxisAlignment:
.
start
,
CrossAxisAlignment
children:
[
.
start
,
Text
(
children:
[
feedbackHistory
[
lp
]
Text
(
.
employeNaem
??
feedbackHistory
[
lp
]
"-"
,
.
employeNaem
??
maxLines:
2
,
"-"
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
AppColors
.
semi_black
,
.
semi_black
,
),
),
),
),
Text
(
Text
(
feedbackHistory
[
lp
]
feedbackHistory
[
lp
]
.
createdDatetime
??
.
createdDatetime
??
"-"
,
"-"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
AppColors
.
grey_semi
,
.
grey_semi
,
),
),
),
),
],
],
),
),
Expanded
(
flex:
4
,
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFF3FFD5
,
),
),
),
),
Expanded
(
padding:
flex:
2
,
EdgeInsets
.
symmetric
(
child:
Container
(
horizontal:
5
,
decoration:
BoxDecoration
(
vertical:
10
,
borderRadius:
),
BorderRadius
.
circular
(
child:
Center
(
8
,
child:
Text
(
),
textAlign:
TextAlign
.
center
,
"
${feedbackHistory[lp].status ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
color:
Color
(
0xFFF3FFD5
,
0xFF586000
,
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
center
,
"
${feedbackHistory[lp].status ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF586000
,
),
),
),
),
),
),
),
),
),
),
]
,
)
,
),
),
],
],
),
),
)
,
]
,
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
),
child:
Row
(
),
children:
[
],
Expanded
(
),
flex:
3
,
Container
(
child:
Text
(
padding:
EdgeInsets
.
symmetric
(
"Feedback"
,
vertical:
7.5
,
style:
TextStyle
(
),
fontSize:
14
,
child:
Row
(
fontFamily:
"JakartaSemiBold"
,
children:
[
),
Expanded
(
),
flex:
3
,
),
child:
Text
(
Expanded
(
"Feedback"
,
flex:
7
,
style:
TextStyle
(
child:
DottedLine
(
fontSize:
14
,
dashGapLength:
4
,
fontFamily:
"JakartaSemiBold"
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
),
]
,
)
,
),
),
Expanded
(
flex:
7
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Feedback"
,
"Attachment"
,
];
final
subHeads
=
[
feedbackHistory
[
lp
].
feedback
??
"-"
,
"View"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
),
...
List
.
generate
(
2
,
(
j
)
{
child:
Row
(
final
heads
=
[
crossAxisAlignment:
"Feedback"
,
CrossAxisAlignment
.
start
,
"Attachment"
,
children:
[
];
Expanded
(
final
subHeads
=
[
flex:
1
,
feedbackHistory
[
lp
].
feedback
??
"-"
,
child:
Text
(
"View"
,
textAlign:
TextAlign
.
left
,
];
heads
[
j
],
return
Container
(
style:
TextStyle
(
padding:
EdgeInsets
.
symmetric
(
fontFamily:
vertical:
3
,
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
child:
Row
(
if
(
subHeads
[
j
]
==
"View"
)
...[
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
.
start
,
flex:
3
,
children:
[
child:
InkResponse
(
Expanded
(
onTap:
()
{
flex:
1
,
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
left
,
textAlign:
heads
[
j
],
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
),
),
if
(
subHeads
[
j
]
==
"View"
)
...[
),
Expanded
(
]
else
...[
flex:
3
,
Expanded
(
child:
InkResponse
(
flex:
4
,
onTap:
()
{
child:
Text
(
Navigator
.
push
(
textAlign:
TextAlign
.
right
,
context
,
subHeads
[
j
]
==
""
MaterialPageRoute
(
?
"-"
builder:
:
subHeads
[
j
],
(
maxLines:
2
,
context
,
style:
TextStyle
(
)
=>
Fileviewer
(
fontSize:
14
,
fileName:
color:
Color
(
0xFF818181
),
feedbackHistory
[
lp
].
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
),
),
),
),
]
else
...[
Expanded
(
flex:
4
,
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
maxLines:
2
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
],
),
],
),
),
],
);
],
}),
),
],
);
),
}),
);
],
},
),
),
]
else
...[
InkResponse
(
onTap:
()
async
{
_showFeedbackSheet
(
context
);
},
child:
Container
(
height:
50
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Center
(
);
child:
Text
(
},
textAlign:
TextAlign
.
right
,
),
"+ Feedback Update"
,
),
style:
TextStyle
(
]
else
...[
fontFamily:
"JakartaMedium"
,
InkResponse
(
fontSize:
14
,
onTap:
()
async
{
color:
AppColors
.
app_blue
,
_showFeedbackSheet
(
context
);
),
},
),
child:
Container
(
height:
50
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
right
,
"+ Feedback Update"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
],
),
),
],
///PaymentHistory details
///PaymentHistory details
if
(
paymentHistory
.
isNotEmpty
)
...[
if
(
paymentHistory
.
isNotEmpty
)
...[
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
10
,
left:
10
,
right:
10
,
right:
10
,
top:
10
,
top:
10
,
),
),
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
"Payment Details"
,
"Payment Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
color:
AppColors
.
grey_thick
,
),
),
),
),
),
],
),
),
],
),
),
SizedBox
(
width:
double
.
infinity
,
height:
225
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
),
SizedBox
(
itemCount:
paymentHistory
.
length
,
width:
double
.
infinity
,
itemBuilder:
(
context
,
lp
)
{
height:
225
,
return
Container
(
child:
ListView
.
builder
(
height:
225
,
physics:
AlwaysScrollableScrollPhysics
(),
width:
shrinkWrap:
true
,
MediaQuery
.
of
(
context
).
size
.
width
*
scrollDirection:
Axis
.
horizontal
,
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
),
itemCount:
paymentHistory
.
length
,
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
225
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
child:
Column
(
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
mainAxisAlignment:
flex:
1
,
MainAxisAlignment
.
start
,
child:
SvgPicture
.
asset
(
crossAxisAlignment:
"assets/svg/order/payment_history_ic.svg"
,
CrossAxisAlignment
.
start
,
),
children:
[
),
Expanded
(
SizedBox
(
width:
10
),
flex:
1
,
Expanded
(
child:
SvgPicture
.
asset
(
flex:
6
,
"assets/svg/order/payment_history_ic.svg"
,
child:
SizedBox
(
),
child:
Column
(
),
// mainAxisAlignment: MainAxisAlignment.start,
SizedBox
(
width:
10
),
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
flex:
6
,
.
start
,
child:
SizedBox
(
mainAxisAlignment:
child:
Column
(
MainAxisAlignment
.
start
,
// mainAxisAlignment: MainAxisAlignment.start,
children:
[
crossAxisAlignment:
Row
(
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
4
,
Expanded
(
child:
Column
(
flex:
4
,
crossAxisAlignment:
child:
Column
(
CrossAxisAlignment
crossAxisAlignment:
.
start
,
CrossAxisAlignment
children:
[
.
start
,
Text
(
children:
[
paymentHistory
[
lp
]
Text
(
.
ename
??
paymentHistory
[
lp
]
"-"
,
.
ename
??
style:
TextStyle
(
"-"
,
fontFamily:
style:
TextStyle
(
"JakartaMedium"
,
fontFamily:
fontSize:
"JakartaMedium"
,
14
,
fontSize:
color:
14
,
AppColors
color:
.
semi_black
,
AppColors
),
.
semi_black
,
),
),
Text
(
"₹
${paymentHistory[lp]
.amount ??
"-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
Text
(
],
"₹
${paymentHistory[lp]
.amount ??
"-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
],
],
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
height:
45
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
processed_bg_color
,
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
),
),
Expanded
(
child:
Center
(
flex:
2
,
child:
Text
(
child:
Container
(
paymentHistory
[
lp
].
approvalStatus
??
"-"
,
height:
45
,
textAlign:
padding:
TextAlign
.
right
,
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
5
,
fontFamily:
)
,
"JakartaMedium"
,
decoration:
BoxDecoration
(
fontSize:
14
,
color:
color:
AppColors
AppColors
.
processed_bg_color
,
.
processed_text_color
,
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
Center
(
child:
Text
(
paymentHistory
[
lp
].
approvalStatus
??
"-"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
processed_text_color
,
),
),
),
),
),
),
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
),
child:
Row
(
),
children:
[
Expanded
(
],
flex:
4
,
),
child:
Text
(
Container
(
"Payment Info"
,
padding:
EdgeInsets
.
symmetric
(
style:
TextStyle
(
vertical:
10
,
fontSize:
14
,
),
fontFamily:
child:
Row
(
"JakartaSemiBold"
,
children:
[
),
Expanded
(
),
flex:
4
,
),
child:
Text
(
Expanded
(
"Payment Info"
,
flex:
6
,
style:
TextStyle
(
child:
DottedLine
(
fontSize:
14
,
dashGapLength:
4
,
fontFamily:
dashGapColor:
Colors
.
white
,
"JakartaSemiBold"
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
),
]
,
)
,
),
),
),
Expanded
(
...
List
.
generate
(
3
,
(
j
)
{
flex:
6
,
final
headsa
=
[
child:
DottedLine
(
"Mode of Payment"
,
dashGapLength:
4
,
"Payment Reference"
,
dashGapColor:
Colors
.
white
,
"Adjusted Amount"
,
dashColor:
"Payment Date"
,
AppColors
.
grey_semi
,
];
dashLength:
2
,
final
subHeadsa
=
[
lineThickness:
0.5
,
paymentHistory
[
lp
]
.
paymentType
??
"-"
,
paymentHistory
[
lp
]
.
refNo
??
"-"
,
"₹
${paymentHistory[lp]
.adjustedAmount ??
"-"}
"
,
paymentHistory
[
lp
]
.
paymentDate
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
),
child:
Row
(
),
crossAxisAlignment:
],
CrossAxisAlignment
.
start
,
),
children:
[
),
Expanded
(
...
List
.
generate
(
3
,
(
j
)
{
child:
Text
(
final
headsa
=
[
textAlign:
TextAlign
.
left
,
"Mode of Payment"
,
headsa
[
j
],
"Payment Reference"
,
style:
TextStyle
(
"Adjusted Amount"
,
fontFamily:
"Payment Date"
,
"JakartaRegular"
,
];
fontSize:
14
,
final
subHeadsa
=
[
color:
paymentHistory
[
lp
]
AppColors
.
paymentType
??
.
semi_black
,
"-"
,
paymentHistory
[
lp
]
),
.
refNo
??
),
"-"
,
"₹
${paymentHistory[lp]
.adjustedAmount ??
"-"}
"
,
paymentHistory
[
lp
]
.
paymentDate
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
headsa
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Expanded
(
),
child:
Text
(
),
textAlign:
Expanded
(
TextAlign
.
right
,
child:
Text
(
subHeadsa
[
j
]
==
""
textAlign:
?
"-"
TextAlign
.
right
,
:
subHeadsa
[
j
]
,
subHeadsa
[
j
]
==
""
style:
TextStyle
(
?
"-"
fontSize:
14
,
:
subHeadsa
[
j
]
,
color:
Color
(
style:
TextStyle
(
0xFF818181
,
fontSize:
14
,
),
color:
Color
(
)
,
0xFF818181
,
),
),
),
),
]
,
)
,
),
),
);
],
}),
),
);
}),
],
],
),
),
);
);
},
},
),
),
),
),
],
],
],
),
],
],
),
),
),
],
bottomNavigationBar:
),
),
Container
(
bottomNavigationBar:
decoration:
BoxDecoration
(
color:
Colors
.
white
),
alignment:
Alignment
.
center
,
height:
65
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
Container
(
child:
InkResponse
(
decoration:
BoxDecoration
(
onTap:
()
{
color:
Colors
.
white
// provider
),
// .approveRejectPaymentRequestAPIFunction(
alignment:
Alignment
.
center
,
// context,
height:
65
,
// provider.requestsDetails.id,
child:
Row
(
// );
mainAxisAlignment:
MainAxisAlignment
.
center
,
_showLevelApprovalSheet
(
children:
[
context
);
},
Expanded
(
child:
Container
(
child:
InkResponse
(
// decoration: BoxDecoration(
onTap:
()
{
// borderRadius: BorderRadius.circular(8),
// provider
// color: Color(0xFFE7FFE5),
// .approveRejectPaymentRequestAPIFunction(
// border: Border.all(
// context,
// color: Color(0xFF0D9C00),
// provider.requestsDetails.id,
// width: 0.5,
// );
// ),
_showLevelApprovalSheet
(
// ),
context
);
child:
Row
(
},
mainAxisAlignment:
MainAxisAlignment
.
center
,
child:
Container
(
children:
[
// decoration: BoxDecoration(
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
),
// borderRadius: BorderRadius.circular(8),
SizedBox
(
width:
10
,),
// color: Color(0xFFE7FFE5),
Center
(
// border: Border.all(
child:
Text
(
// color: Color(0xFF0D9C00),
"Approve"
,
// width: 0.5,
style:
TextStyle
(
// ),
color:
AppColors
.
semi_black
,
// ),
),
child:
Row
(
),
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
),
SizedBox
(
width:
10
,),
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
),
),
]
,
)
,
),
),
)
,
]
,
),
),
),
),
),
),
],
],
),
),
),
),
),
),
onWillPop:
()
{
return
onBackPressed
(
context
);
},
);
);
},
},
);
);
...
...
lib/screens/order/tpcAgentListByMode.dart
View file @
12aa06e4
...
@@ -71,7 +71,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
...
@@ -71,7 +71,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
?
Platform
.
isAndroid
?
Platform
.
isAndroid
?
WillPopScope
(
?
WillPopScope
(
onWillPop:
()
{
onWillPop:
()
{
Provider
.
of
<
Tpcagentsprovider
>(
context
).
resetAll
();
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
).
resetAll
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
SafeArea
(
child:
SafeArea
(
...
@@ -89,169 +89,159 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
...
@@ -89,169 +89,159 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
return
Consumer
<
Tpcagentsprovider
>(
return
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
final
tpcAgentsLists
=
provider
.
tpcAgentsList
;
final
tpcAgentsLists
=
provider
.
tpcAgentsList
;
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
{
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
();
appBar:
appbar2New
(
return
onBackPressed
(
context
);
context
,
},
widget
.
pageTitleName
,
child:
SafeArea
(
provider
.
resetAll
,
top:
false
,
Row
(
bottom:
Platform
.
isIOS
?
false
:
true
,
children:
[
child:
Scaffold
(
// InkResponse(
resizeToAvoidBottomInset:
true
,
// onTap: () {
appBar:
appbar2New
(
// // _showOptionsSheet(context);
context
,
// },
widget
.
pageTitleName
,
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
provider
.
resetAll
,
// ),
Row
(
children:
[
// InkResponse(
],
// onTap: () {
),
// // _showOptionsSheet(context);
0xFFFFFFFF
// },
),
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
backgroundColor:
AppColors
.
scaffold_bg_color
,
// ),
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
],
valueColor:
AlwaysStoppedAnimation
<
Color
>(
),
AppColors
.
app_blue
)
0xFFFFFFFF
))
),
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Column
(
body:
children:
[
provider
.
isLoading
ListView
.
builder
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
itemCount:
tpcAgentsLists
.
length
,
valueColor:
AlwaysStoppedAnimation
<
Color
>(
shrinkWrap:
true
,
AppColors
.
app_blue
)
physics:
NeverScrollableScrollPhysics
(),
))
itemBuilder:
(
context
,
index
)
{
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
if
(
tpcAgentsLists
.
isEmpty
)
{
child:
Column
(
return
SizedBox
(
children:
[
child:
Center
(
ListView
.
builder
(
child:
Text
(
"No Data Available"
),
itemCount:
tpcAgentsLists
.
length
,
),
shrinkWrap:
true
,
);
physics:
NeverScrollableScrollPhysics
(),
}
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
if
(
tpcAgentsLists
.
isEmpty
)
{
onTap:
()
async
{
return
SizedBox
(
Navigator
.
push
(
context
,
MaterialPageRoute
(
child:
Center
(
builder:
(
context
)
=>
child:
Text
(
"No Data Available"
),
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
),
pageTitleName:
widget
.
pageTitleName
,
);
tpcAgentId:
tpcAgentsLists
[
index
]
}
.
tpcAgentId
,
return
InkResponse
(
),));
onTap:
()
async
{
},
Navigator
.
push
(
context
,
MaterialPageRoute
(
child:
Container
(
builder:
(
context
)
=>
padding:
EdgeInsets
.
symmetric
(
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
horizontal:
7.5
,
pageTitleName:
widget
.
pageTitleName
,
vertical:
5
,
tpcAgentId:
tpcAgentsLists
[
index
]
),
.
tpcAgentId
,
margin:
EdgeInsets
.
symmetric
(
),));
horizontal:
10
,
},
vertical:
5
,
child:
Container
(
),
padding:
EdgeInsets
.
symmetric
(
decoration:
BoxDecoration
(
horizontal:
7.5
,
color:
Colors
.
white
,
vertical:
5
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
margin:
EdgeInsets
.
symmetric
(
child:
Column
(
horizontal:
10
,
children:
[
vertical:
5
,
Row
(
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
width:
35
,
// decoration: BoxDecoration(
// color: Color(0xFFEAF7FF),
// decoration: BoxDecoration(
// borderRadius:
// color: Color(0xFFEAF7FF),
// BorderRadius.circular(8),
// borderRadius:
// ),
// BorderRadius.circular(8),
child:
SvgPicture
.
asset
(
// ),
"assets/svg/order/tpc_list_ic.svg"
,
child:
SvgPicture
.
asset
(
"assets/svg/order/tpc_list_ic.svg"
,
),
),
),
),
SizedBox
(
width:
10
),
),
Expanded
(
),
flex:
5
,
SizedBox
(
width:
10
),
child:
SizedBox
(
Expanded
(
child:
Column
(
flex:
5
,
crossAxisAlignment:
child:
SizedBox
(
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
Text
(
CrossAxisAlignment
.
start
,
tpcAgentsLists
[
index
].
name
!,
children:
[
maxLines:
1
,
Text
(
overflow:
TextOverflow
.
ellipsis
,
tpcAgentsLists
[
index
].
name
!,
style:
TextStyle
(
maxLines:
1
,
fontFamily:
overflow:
TextOverflow
.
ellipsis
,
"JakartaRegular"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
color:
"JakartaRegular"
,
AppColors
.
semi_black
,
fontSize:
14
,
),
color:
),
AppColors
.
semi_black
,
Text
(
),
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
Text
(
),
SizedBox
(
width:
10
),
"
${tpcAgentsLists[index]
Expanded
(
.mobileNumber}
"
,
flex:
1
,
style:
TextStyle
(
child:
InkResponse
(
fontFamily:
onTap:
()
{
"JakartaRegular"
,
launch
(
fontSize:
14
,
'tel://
${tpcAgentsLists[index]
color:
AppColors
.
grey_semi
,
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
),
),
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsLists[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
),
),
),
),
),
],
),
),
],
],
),
),
),
);
},
],
),
),
],
),
);
},
),
),
)
:
Emptywidget
(
context
)
,
]
,
),
),
),
)
:
Emptywidget
(
context
)
,
);
);
},
},
);
);
...
...
lib/services/api_calling.dart
View file @
12aa06e4
...
@@ -2463,7 +2463,7 @@ class ApiCalling {
...
@@ -2463,7 +2463,7 @@ class ApiCalling {
'billing_state'
:
billing_state
.
toString
(),
'billing_state'
:
billing_state
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'order_products'
:
jsonEncode
(
order_products
).
toString
(),
'order_products'
:
(
order_products
).
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'in_time'
:
in_time
.
toString
(),
'in_time'
:
in_time
.
toString
(),
...
...
pubspec.lock
View file @
12aa06e4
...
@@ -289,6 +289,14 @@ packages:
...
@@ -289,6 +289,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.3.9"
version: "2.3.9"
dropdown_search:
dependency: "direct main"
description:
name: dropdown_search
sha256: c29b3e5147a82a06a4a08b3b574c51cb48cc17ad89893d53ee72a6f86643622e
url: "https://pub.dev"
source: hosted
version: "6.0.2"
equatable:
equatable:
dependency: transitive
dependency: transitive
description:
description:
...
...
pubspec.yaml
View file @
12aa06e4
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.97+10
5
version
:
1.0.97+10
6
environment
:
environment
:
sdk
:
^3.7.2
sdk
:
^3.7.2
...
@@ -85,6 +85,7 @@ dependencies:
...
@@ -85,6 +85,7 @@ dependencies:
flutter_staggered_grid_view
:
^0.7.0
flutter_staggered_grid_view
:
^0.7.0
dotted_line
:
^3.2.3
dotted_line
:
^3.2.3
flutter_slidable
:
^4.0.0
flutter_slidable
:
^4.0.0
dropdown_search
:
^6.0.2
dev_dependencies
:
dev_dependencies
:
flutter_test
:
flutter_test
:
...
...
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