Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
ecd8fcd1
Commit
ecd8fcd1
authored
Jul 07, 2025
by
Sai Srinivas
Browse files
07-07-2025 By Sai Srinivas
Pubspec and Safe Area.
parent
67ab0f3e
Changes
92
Hide whitespace changes
Inline
Side-by-side
lib/screens/crm/universalSearchScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/screens/crm/ProspectDetailsByMode.dart'
;
import
'package:generp/screens/crm/ProspectDetailsByMode.dart'
;
...
@@ -32,12 +34,14 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
...
@@ -32,12 +34,14 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Search"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
SingleChildScrollView
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Search"
),
body:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
if
(
provider
.
accountsList
.
length
>
0
)
...[
if
(
provider
.
accountsList
.
length
>
0
)
...[
...
...
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -59,321 +61,325 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -59,321 +61,325 @@ class _AllpaymentrequesitionlistsbymodesState
onWillPop:
()
{
onWillPop:
()
{
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetForm
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetForm
,
// onTap: () {
Row
(
// _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// onTap: () {
// ),
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
var
cf
=
Commondaterangefilter
();
var
cf
=
Commondaterangefilter
();
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
var
dateRange
=
result
[
'dateRange'
]
as
DateTimeRange
?;
var
dateRange
=
result
[
'dateRange'
]
as
DateTimeRange
?;
print
(
"dateRange:
$dateRange
"
);
print
(
"dateRange:
$dateRange
"
);
var
formatted
=
result
[
'formatted'
]
as
List
<
String
>;
var
formatted
=
result
[
'formatted'
]
as
List
<
String
>;
print
(
"formatted:
$formatted
"
);
print
(
"formatted:
$formatted
"
);
if
(
formatted
.
isNotEmpty
)
{
if
(
formatted
.
isNotEmpty
)
{
var
fromDate
=
formatted
[
0
];
// From date
var
fromDate
=
formatted
[
0
];
// From date
var
toDate
=
formatted
[
1
];
// To date
var
toDate
=
formatted
[
1
];
// To date
print
(
"from_date:
$fromDate
"
);
print
(
"from_date:
$fromDate
"
);
print
(
"to_date:
$toDate
"
);
print
(
"to_date:
$toDate
"
);
provider
.
paymentRequestionListsAPIFunction
(
provider
.
paymentRequestionListsAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
fromDate
,
fromDate
,
toDate
,
toDate
,
);
);
// You can now use fromDate and toDate as needed
// You can now use fromDate and toDate as needed
// For example, store them or pass to another function
// For example, store them or pass to another function
}
else
{
print
(
"No valid date range selected"
);
}
}
else
{
}
else
{
print
(
"
No valid date range
select
ed
"
);
print
(
"
Bottom sheet closed without
select
ion
"
);
}
}
}
else
{
},
print
(
"Bottom sheet closed without selection"
);
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
}
),
},
],
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
),
),
],
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
provider
.
isLoading
SafeArea
(
child:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
AppColors
.
app_blue
)
))
))
:
requestLists
.
isNotEmpty
?
SizedBox
(
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
Scrollbar
(
thumbVisibility:
false
,
thumbVisibility:
false
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
if
(
requestLists
.
isEmpty
)
{
if
(
requestLists
.
isEmpty
)
{
return
SizedBox
(
return
SizedBox
(
child:
Center
(
child:
Center
(
child:
Text
(
"No Data Available"
),
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
),
);
margin:
EdgeInsets
.
symmetric
(
}
horizontal:
10
,
return
Container
(
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
decoration:
BoxDecoration
(
vertical:
10
,
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
),
horizontal:
10
,
child:
Column
(
vertical:
10
,
children:
[
),
Row
(
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
Expanded
(
borderRadius:
BorderRadius
.
circular
(
16
),
flex:
1
,
),
child:
Container
(
child:
Column
(
height:
50
,
children:
[
width:
35
,
Row
(
padding:
EdgeInsets
.
all
(
8.0
),
children:
[
decoration:
BoxDecoration
(
Expanded
(
color:
Color
(
0xFFFFF3CE
),
flex:
1
,
borderRadius:
child:
Container
(
BorderRadius
.
circular
(
8
),
height:
50
,
),
width:
35
,
child:
SvgPicture
.
asset
(
padding:
EdgeInsets
.
all
(
8.0
),
"assets/svg/fin_ic.svg"
,
decoration:
BoxDecoration
(
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
),
"assets/svg/fin_ic.svg"
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
),
),
Expanded
(
SizedBox
(
width:
10
),
flex:
2
,
Expanded
(
child:
Container
(
flex:
4
,
padding:
EdgeInsets
.
symmetric
(
child:
SizedBox
(
horizontal:
5
,
child:
Column
(
vertical:
10
,
crossAxisAlignment:
),
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
borderRadius:
Text
(
BorderRadius
.
circular
(
8
),
requestLists
[
index
]
color:
Color
(
0xFFE3FFE0
),
.
accountName
!,
),
child:
Center
(
child:
Text
(
requestLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
Color
(
0xFF0D9C00
),
AppColors
.
semi_black
,
),
),
),
),
Text
(
),
"₹"
),
"
${requestLists[index].amount}
"
,
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
if
(
j
==
1
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
){
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
Expanded
(
),
child:
InkResponse
(
),
onTap:
Expanded
(
j
!=
1
flex:
2
,
?
null
child:
Container
(
:
()
{
padding:
EdgeInsets
.
symmetric
(
Navigator
.
push
(
horizontal:
5
,
context
,
vertical:
10
,
MaterialPageRoute
(
),
builder:
decoration:
BoxDecoration
(
(
borderRadius:
context
,
BorderRadius
.
circular
(
8
),
)
=>
Fileviewer
(
color:
Color
(
0xFFE3FFE0
),
fileName:
),
requestLists
[
index
]
child:
Center
(
.
attachmentViewFileName
!,
child:
Text
(
fileUrl:
requestLists
[
index
].
status
!,
requestLists
[
index
]
textAlign:
TextAlign
.
center
,
.
attachmentDirFilePath
!,
style:
TextStyle
(
),
fontFamily:
"JakartaMedium"
,
),
fontSize:
14
,
);
color:
Color
(
0xFF0D9C00
),
},
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
]
.
id
,
),
),
),
);
if
(
res
==
true
){
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
),
),
child:
Row
(
],
crossAxisAlignment:
),
CrossAxisAlignment
.
center
,
Divider
(
mainAxisAlignment:
thickness:
0.5
,
MainAxisAlignment
.
start
,
color:
Color
(
0xFFD7D7D7
),
children:
[
),
Text
(
...
List
.
generate
(
4
,
(
j
)
{
"View Details"
,
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
if
(
j
==
1
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
){
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
SizedBox
(
width:
5
),
Expanded
(
SvgPicture
.
asset
(
child:
InkResponse
(
"assets/svg/next_button.svg"
,
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
],
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
]
.
id
,
),
),
),
);
if
(
res
==
true
){
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
),
),
)
,
)
:
Emptywidget
(
context
)
):
Emptywidget
(
context
),
)
),
),
),
);
);
},
},
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
ecd8fcd1
...
@@ -112,20 +112,26 @@ class _PaymentrequestionlistdetailsState
...
@@ -112,20 +112,26 @@ class _PaymentrequestionlistdetailsState
shouldShowButtons
=
[
shouldShowButtons
=
[
"Level 2 Approved"
,
"Level 2 Approved"
,
"Level 2 approved"
,
"Level 2 approved"
,
].
contains
(
req_det
.
status
);
// Show buttons if Level 2 is approved
].
contains
(
req_det
.
status
);
}
else
if
(
widget
.
mode
==
"self_apr_lvl2"
){
shouldShowButtons
=
[
"Requested"
].
contains
(
req_det
.
status
);
}
}
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetAll
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
widget
.
pageName
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
provider
.
resetAll
,
body:
SafeArea
(
SizedBox
(
width:
0
),
child:
Container
(
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
@@ -315,64 +321,25 @@ class _PaymentrequestionlistdetailsState
...
@@ -315,64 +321,25 @@ class _PaymentrequestionlistdetailsState
),
),
),
),
),
),
),
bottomNavigationBar:
bottomNavigationBar:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
?
Container
(
height:
0
)
?
Container
(
height:
0
)
:
Container
(
:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
alignment:
Alignment
.
bottomCenter
,
height:
60
,
height:
60
,
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
margin:
EdgeInsets
.
only
(
bottom:
10
),
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
child:
InkResponse
(
onTap:
()
{
print
(
provider
.
requestsDetails
.
id
);
_showLevelRejectionSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Reject"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
SizedBox
(
width:
10
),
if
([
"apr_lvl1"
,
"apr_lvl2"
,
].
contains
(
widget
.
mode
))
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
print
(
provider
.
requestsDetails
.
id
);
.
approveRejectPaymentRequestAPIFunction
(
_showLevelRejectionSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
_showLevelApprovalSheet
(
context
,
context
,
provider
.
requestsDetails
.
id
,
provider
.
requestsDetails
.
id
,
);
);
...
@@ -380,186 +347,226 @@ class _PaymentrequestionlistdetailsState
...
@@ -380,186 +347,226 @@ class _PaymentrequestionlistdetailsState
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFF
E7
FFE
5
),
color:
Color
(
0xFFFFE
FEF
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
Color
(
0xFF
0D9C00
),
color:
Color
(
0xFF
ED3424
),
width:
0.5
,
width:
0.5
,
),
),
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
"
Approve
"
,
"
Reject
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF
0D9C00
),
color:
Color
(
0xFF
ED3424
),
),
),
),
),
),
),
),
),
),
),
),
),
]
else
if
(
widget
.
mode
==
"process"
)
...[
SizedBox
(
width:
10
),
Expanded
(
if
([
child:
InkResponse
(
"apr_lvl1"
,
onTap:
()
{
"apr_lvl2"
,
provider
"self_apr_lvl2"
.
approveRejectPaymentRequestAPIFunction
(
].
contains
(
widget
.
mode
))
...[
context
,
Expanded
(
provider
.
requestsDetails
.
id
,
child:
InkResponse
(
);
onTap:
()
{
provider
.
preValues
();
provider
_showAddPaymentSheet
(
.
approveRejectPaymentRequestAPIFunction
(
context
,
context
,
provider
.
requestsDetails
.
id
,
provider
.
requestsDetails
.
id
,
);
);
},
_showLevelApprovalSheet
(
child:
Container
(
context
,
decoration:
BoxDecoration
(
provider
.
requestsDetails
.
id
,
borderRadius:
BorderRadius
.
circular
(
8
),
);
color:
Color
(
0xFFE7FFE5
),
},
border:
Border
.
all
(
child:
Container
(
color:
Color
(
0xFF0D9C00
),
decoration:
BoxDecoration
(
width:
0.5
,
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
child:
Center
(
),
child:
Text
(
),
"Add Payment"
,
]
else
if
(
widget
.
mode
==
"process"
)
...[
style:
TextStyle
(
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
provider
.
preValues
();
_showAddPaymentSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Add Payment"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
),
),
),
)
,
]
,
],
],
]
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
f
loatingActionButtonLocation
:
F
loatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
// bottomNavigationBar:
//
bottomNavigationBar:
//
(["admin", "self"].contains(widget.mode))
//
(["admin", "self"].contains(widget.mode)
)
//
? Container(height: 0
)
//
? Container(height: 0)
//
: ([
//
: ([
//
"Level 1 Approved",
// "Level 1
Approv
ed",
// "Level 1
Reject
ed",
// "Level 1
Reject
ed",
// "Level 1
approv
ed",
// "Level 1
approv
ed",
// "Level 1
reject
ed",
// "Level
1 reject
ed",
// "Level
2 Approv
ed",
// "Level 2
Approv
ed",
// "Level 2
Reject
ed",
// "Level 2
Reject
ed",
// "Level 2
approv
ed",
// "Level 2
approv
ed",
// "Level 2
reject
ed",
//
"Level 2 rejected",
//
]).contains(req_det.status)
//
]).contains(req_det.status
)
//
? SizedBox(height: 0
)
//
? SizedBox(height: 0)
//
: Container(
//
: Container(
//
margin: EdgeInsets.symmetric(horizontal: 10),
//
margin: EdgeInsets.symmetric(horizontal: 10)
,
//
alignment: Alignment.bottomCenter
,
//
alignment: Alignment.bottomCenter
,
//
height: 60
,
//
height: 60,
//
child: Container(
//
child: Container(
//
margin: EdgeInsets.only(bottom: 10),
//
margin: EdgeInsets.only(bottom: 10)
,
//
alignment: Alignment.center
,
//
alignment: Alignment.center
,
//
height: 45
,
//
height: 45,
//
child: Row(
//
child: Row(
//
mainAxisAlignment: MainAxisAlignment.center,
//
mainAxisAlignm
en
t
:
MainAxisAlignment.center,
//
childr
en:
[
//
children: [
//
Expanded(
//
Expanded
(
//
child: InkResponse
(
//
child: InkResponse(
//
onTap: () {
//
onTap: () {
//
_showLevelRejectionSheet(context);
//
_showLevelRejectionSheet(context);
//
},
//
},
//
child: Container(
//
child: Container
(
//
decoration: BoxDecoration
(
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(8),
//
borderRadius: BorderRadius.circular(8
),
//
color: Color(0xFFFFEFEF
),
//
color: Color(0xFFFFEFEF),
//
border: Border.all(
//
border: Border.all(
//
color: Color(0xFFED3424),
//
color: Color(0xFFED3424)
,
//
width: 0.5
,
//
width: 0.5
,
//
)
,
//
),
//
),
//
),
//
child: Center(
//
child:
Center
(
//
child:
Text
(
//
child: Text(
//
"Reject",
//
"Reject",
//
style: TextStyle(
//
style: TextStyle(
//
color: Color(0xFFED3424),
//
color: Color(0xFFED3424
),
// ),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
// ),
//
SizedBox(width: 10
),
//
SizedBox(width: 10),
//
if ([
//
if ([
//
"apr_lvl1",
// "apr_lvl
1
",
// "apr_lvl
2
",
//
"apr_lvl2",
//
].contains(widget.mode)) ...[
//
].contains(widget.mode)) ...[
//
Expanded(
//
Expanded
(
//
child: InkResponse
(
//
child: InkResponse(
//
onTap: () {
//
onTap: () {
//
provider
//
provider
//
.approveRejectPaymentRequestAPIFunction(
//
.approveRejectPaymentRequestAPIFunction(
//
context,
//
context
,
//
provider.requestsDetails.id
,
//
provider.requestsDetails.id,
//
);
//
);
//
_showLevelApprovalSheet(context
);
//
_showLevelApprovalSheet(context);
//
},
//
},
//
child: Container(
//
child: Container
(
//
decoration: BoxDecoration
(
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(8),
//
borderRadius: BorderRadius.circular(8
),
//
color: Color(0xFFE7FFE5
),
//
color: Color(0xFFE7FFE5),
//
border: Border.all(
//
border: Border.all(
//
color: Color(0xFF0D9C00),
//
color: Color(0xFF0D9C00)
,
//
width: 0.5
,
//
width: 0.5
,
//
)
,
//
),
//
),
//
),
//
child: Center(
//
child:
Center
(
//
child:
Text
(
//
child: Text(
//
"Approve",
//
"Approve",
//
style: TextStyle(
//
style: TextStyle(
//
color: Color(0xFF0D9C00),
//
color: Color(0xFF0D9C00
),
// ),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
] else if (widget.mode == "process") ...[
//
] else if (widget.mode == "process") ...[
//
Expanded(
//
Expanded
(
//
child: InkResponse
(
//
child: InkResponse(
//
onTap: () {
//
onTap: () {
//
provider
//
provider
//
.approveRejectPaymentRequestAPIFunction(
//
.approveRejectPaymentRequestAPIFunction(
//
context,
//
context
,
//
provider.requestsDetails.id
,
//
provider.requestsDetails.id,
//
);
//
);
//
_showAddPaymentSheet(context
);
//
_showAddPaymentSheet(context);
//
},
//
},
//
child: Container(
//
child: Container
(
//
decoration: BoxDecoration
(
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(8),
//
borderRadius: BorderRadius.circular(8
),
//
color: Color(0xFFE7FFE5
),
//
color: Color(0xFFE7FFE5),
//
border: Border.all(
//
border: Border.all(
//
color: Color(0xFF0D9C00),
//
color: Color(0xFF0D9C00)
,
//
width: 0.5
,
//
width: 0.5
,
//
)
,
//
),
//
),
//
),
//
child: Center(
//
child:
Center
(
//
child:
Text
(
//
child: Text(
//
"Add Payment",
//
"Add Payment",
//
style: TextStyle(
//
style: TextStyle(
//
color: Color(0xFF0D9C00),
//
color: Color(0xFF0D9C00
),
// ),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
),
//
)
,
//
]
,
//
],
//
],
//
]
,
//
)
,
//
),
//
),
//
),
//
),
//
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
provider
.
resetAll
();
provider
.
resetAll
();
...
@@ -644,6 +651,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -644,6 +651,7 @@ class _PaymentrequestionlistdetailsState
focusNodes
[
1
],
focusNodes
[
1
],
TextInputAction
.
next
TextInputAction
.
next
),
),
errorWidget
(
context
,
provider
.
ApprovedAmountError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
remarks
,
remarks
,
...
@@ -657,6 +665,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -657,6 +665,7 @@ class _PaymentrequestionlistdetailsState
null
,
null
,
TextInputAction
.
done
TextInputAction
.
done
),
),
errorWidget
(
context
,
provider
.
remarksError
),
TextWidget
(
context
,
"Proposed Payment Account"
),
TextWidget
(
context
,
"Proposed Payment Account"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
...
@@ -881,6 +890,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -881,6 +890,7 @@ class _PaymentrequestionlistdetailsState
null
,
null
,
focusNodes
[
2
],
null
,
TextInputAction
.
done
focusNodes
[
2
],
null
,
TextInputAction
.
done
),
),
errorWidget
(
context
,
provider
.
remarksError
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
provider
provider
...
...
lib/screens/finance/addPaymentReceiptList.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
...
@@ -49,12 +51,14 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -49,12 +51,14 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
return
Consumer
<
Paymentreceiptsprovider
>(
return
Consumer
<
Paymentreceiptsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
,)),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
,)),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
...
@@ -537,31 +541,31 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -537,31 +541,31 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
),
),
),
),
),
),
),
floatingActionButtonLocation:
f
loatingActionButtonLocation
:
F
loatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
floatingActionButton:
InkResponse
(
onTap:
provider
.
submitClicked
?
null
:
()
{
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
provider
.
addReceiptPaymentRequestionSubmitAPI
(
context
,
provider
.
formattedDate
)
;
provider
.
addReceiptPaymentRequestionSubmitAPI
(
context
,
provider
.
formattedDate
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
)
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
),
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
):
Text
(
):
Text
(
"Submit"
,
"Submit"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
font
Size:
15
,
font
Family:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
color:
Colors
.
white
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/directPaymentRequesitionList.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -56,12 +58,14 @@ class _DirectpaymentrequesitionlistState
...
@@ -56,12 +58,14 @@ class _DirectpaymentrequesitionlistState
return
Consumer
<
Requestionlistprovider
>(
return
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
...
@@ -274,7 +278,7 @@ class _DirectpaymentrequesitionlistState
...
@@ -274,7 +278,7 @@ class _DirectpaymentrequesitionlistState
TextInputAction
.
next
TextInputAction
.
next
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
///payment date toBE
///payment date toBE
TextWidget
(
context
,
"Enter Date"
),
TextWidget
(
context
,
"Enter Date"
),
GestureDetector
(
GestureDetector
(
...
@@ -326,7 +330,7 @@ class _DirectpaymentrequesitionlistState
...
@@ -326,7 +330,7 @@ class _DirectpaymentrequesitionlistState
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
fontSize:
14
,
),
),
enabledBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
...
@@ -546,34 +550,34 @@ class _DirectpaymentrequesitionlistState
...
@@ -546,34 +550,34 @@ class _DirectpaymentrequesitionlistState
),
),
),
),
),
),
),
floatingActionButtonLocation:
f
loatingActionButtonLocation
:
F
loatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
provider
.
submitClicked
?
null
:
()
{
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
provider
.
addDirectPaymentRequestionSubmitAPI
(
provider
.
addDirectPaymentRequestionSubmitAPI
(
context
,
context
,
provider
.
formattedDate
,
provider
.
formattedDate
,
);
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
)
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
1
5
),
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
child:
provider
.
submitClicked
?
CircularProgressIndicat
or
.
a
daptive
(
valueColor:
AlwaysStoppedAnimation
(
AppCol
or
s
.
a
pp_blue
),
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
):
Text
(
):
Text
(
"Submit"
,
"Submit"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
font
Size:
15
,
font
Family:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
color:
Colors
.
white
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/financeDashboard.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/financeProvider/DashboardProvider.dart'
;
import
'package:generp/Notifiers/financeProvider/DashboardProvider.dart'
;
...
@@ -33,12 +35,14 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -33,12 +35,14 @@ class _FinancedashboardState extends State<Financedashboard> {
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Finance"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
SizedBox
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Finance"
),
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
...
@@ -171,28 +175,28 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -171,28 +175,28 @@ class _FinancedashboardState extends State<Financedashboard> {
),
),
),
),
),
),
),
floatingActionButtonLocation:
f
loatingActionButtonLocation
:
F
loatingActionButtonLocation
.
centerFloat
,
F
loatingActionButton
Location
.
centerFloat
,
f
loatingActionButton
:
InkResponse
(
floatingActionButton:
InkResponse
(
onTap:
()
{
onTap:
()
{
_showPaymentOptionsSheet
(
context
);
_showPaymentOptionsSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
Text
(
child:
Text
(
"Add"
,
"Add"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
font
Size:
15
,
font
Family:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
color:
Colors
.
white
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/paymentDetailsPaymentRequisition.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
@@ -46,12 +48,14 @@ class _PaymentdetailspaymentrequisitionState
...
@@ -46,12 +48,14 @@ class _PaymentdetailspaymentrequisitionState
var
payment_det
=
provider
.
paymentDetails
;
var
payment_det
=
provider
.
paymentDetails
;
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
widget
.
pageName
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
SizedBox
(
appBar:
appbar
(
context
,
widget
.
pageName
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
@@ -201,8 +205,8 @@ class _PaymentdetailspaymentrequisitionState
...
@@ -201,8 +205,8 @@ class _PaymentdetailspaymentrequisitionState
),
),
),
),
),
),
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
...
...
lib/screens/finance/paymentListPaymentRequisition.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -48,287 +50,291 @@ late Commondaterangefilter cf;
...
@@ -48,287 +50,291 @@ late Commondaterangefilter cf;
onWillPop:
()
{
onWillPop:
()
{
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetForm
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetForm
,
// onTap: () {
Row
(
// _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// onTap: () {
// ),
// _showOptionsSheet(context);
InkResponse
(
// },
onTap:
()
async
{
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
var
cf
=
Commondaterangefilter
();
// ),
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
InkResponse
(
if
(
result
!=
null
)
{
onTap:
()
async
{
var
dateRange
=
result
[
'dateRange'
]
as
DateTimeRange
?;
var
cf
=
Commondaterangefilter
();
print
(
"dateRange:
$dateRange
"
);
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
if
(
result
!=
null
)
{
var
dateRange
=
result
[
'dateRange'
]
as
DateTimeRange
?;
print
(
"dateRange:
$dateRange
"
);
var
formatted
=
result
[
'formatted'
]
as
List
<
String
>;
var
formatted
=
result
[
'formatted'
]
as
List
<
String
>;
print
(
"formatted:
$formatted
"
);
print
(
"formatted:
$formatted
"
);
if
(
formatted
.
isNotEmpty
)
{
if
(
formatted
.
isNotEmpty
)
{
var
fromDate
=
formatted
[
0
];
// From date
var
fromDate
=
formatted
[
0
];
// From date
var
toDate
=
formatted
[
1
];
// To date
var
toDate
=
formatted
[
1
];
// To date
print
(
"from_date:
$fromDate
"
);
print
(
"from_date:
$fromDate
"
);
print
(
"to_date:
$toDate
"
);
print
(
"to_date:
$toDate
"
);
provider
.
paymentsListAPI
(
context
,
fromDate
,
toDate
);
provider
.
paymentsListAPI
(
context
,
fromDate
,
toDate
);
// You can now use fromDate and toDate as needed
// You can now use fromDate and toDate as needed
// For example, store them or pass to another function
// For example, store them or pass to another function
}
else
{
print
(
"No valid date range selected"
);
}
}
else
{
}
else
{
print
(
"
No valid date range
select
ed
"
);
print
(
"
Bottom sheet closed without
select
ion
"
);
}
}
}
else
{
},
print
(
"Bottom sheet closed without selection"
);
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
}
),
},
],
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
),
),
],
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
body:
SafeArea
(
child:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
AppColors
.
app_blue
)
))
))
:
requestLists
.
isNotEmpty
?
SizedBox
(
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
Scrollbar
(
thumbVisibility:
false
,
thumbVisibility:
false
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
Container
(
child:
Container
(
height:
50
,
height:
50
,
width:
35
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
"assets/svg/fin_ic.svg"
,
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
c
rossAxisAlignment
:
C
rossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
requestLists
[
index
].
receipientAccount
!,
requestLists
[
index
].
receipientAccount
!,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"₹
${requestLists[index].amount}
"
,
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
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: Color(0xFFE3FFE0),
// color: Color(0xFFE3FFE0),
// ),
// ),
// child: Center(
// child: Center(
// child: Text(
// child: Text(
// requestLists[index].refType!,
// requestLists[index].refType!,
// textAlign: TextAlign.center,
// textAlign: TextAlign.center,
// style: TextStyle(
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontFamily: "JakartaMedium",
// fontSize: 14,
// fontSize: 14,
// color: Color(0xFF0D9C00),
// color: Color(0xFF0D9C00),
// ),
// ),
// ),
// ),
// ),
// ),
// ),
// ),
// ),
// ),
],
],
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
5
,
(
j
)
{
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
final
headings
=
[
"To Account"
,
"To Account"
,
"Attachment"
,
"Attachment"
,
"Request Mode"
,
"Request Mode"
,
"Payment Date"
,
"Payment Date"
,
"Note"
,
"Note"
,
];
];
final
subHeadings
=
[
final
subHeadings
=
[
requestLists
[
index
].
payAccount
,
requestLists
[
index
].
payAccount
,
"View"
,
"View"
,
requestLists
[
index
].
requestMode
,
requestLists
[
index
].
requestMode
,
// requestLists[index].attachmentDirFilePath
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
paymentDate
,
requestLists
[
index
].
paymentDate
,
requestLists
[
index
].
description
,
requestLists
[
index
].
description
,
];
];
if
(
headings
[
j
]==
"Attachment"
&&
requestLists
[
index
]
if
(
headings
[
j
]==
"Attachment"
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
){
.
attachmentViewFileName
==
""
){
return
SizedBox
.
shrink
();
return
SizedBox
.
shrink
();
}
}
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
subHeadings
[
j
]==
""
?
"-"
:
subH
eadings
[
j
]
??
"-"
,
h
eadings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
Expanded
(
],
child:
InkResponse
(
),
onTap:
);
j
!=
1
}),
?
null
InkResponse
(
:
()
{
onTap:
()
async
{
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
(
context
)
=>
context
,
Paymentdetailspaymentrequisition
(
)
=>
Fileviewer
(
pageName:
widget
.
pageTitleName
,
fileName:
paymentRequestId:
requestLists
[
index
]
requestLists
[
index
].
id
,
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
subHeadings
[
j
]==
""
?
"-"
:
subHeadings
[
j
]??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
],
),
),
);
);
if
(
res
==
true
){
}),
provider
.
paymentsListAPI
(
context
,
''
,
''
);
InkResponse
(
}
onTap:
()
async
{
},
var
res
=
await
Navigator
.
push
(
child:
Container
(
context
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
MaterialPageRoute
(
child:
Row
(
builder:
crossAxisAlignment:
(
context
)
=>
CrossAxisAlignment
.
center
,
Paymentdetailspaymentrequisition
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
pageName:
widget
.
pageTitleName
,
children:
[
paymentRequestId:
Text
(
requestLists
[
index
].
id
,
"View Details"
,
),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
),
],
);
if
(
res
==
true
){
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
),
),
)
,
)
:
Emptywidget
(
context
)
)
:
Emptywidget
(
context
),)
)
,
),
),
);
);
},
},
...
...
lib/screens/finance/paymentReceiptDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
@@ -45,12 +47,14 @@ class _PaymentreceiptdetailsState
...
@@ -45,12 +47,14 @@ class _PaymentreceiptdetailsState
var
payment_det
=
provider
.
receiptDetails
;
var
payment_det
=
provider
.
receiptDetails
;
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
widget
.
pageName
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
appBar:
appbar
(
context
,
widget
.
pageName
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
@@ -103,7 +107,7 @@ class _PaymentreceiptdetailsState
...
@@ -103,7 +107,7 @@ class _PaymentreceiptdetailsState
),
),
),
),
),
),
],
],
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
@@ -178,8 +182,8 @@ class _PaymentreceiptdetailsState
...
@@ -178,8 +182,8 @@ class _PaymentreceiptdetailsState
),
),
),
),
),
),
),
),
),
),
onWillPop:
()
{
onWillPop:
()
{
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
...
...
lib/screens/finance/paymentreceiptList.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -43,261 +45,265 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -43,261 +45,265 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
onWillPop:
()
{
onWillPop:
()
{
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
widget
.
pageTitleName
,
resizeToAvoidBottomInset:
true
,
provider
.
resetForm
,
appBar:
appbar2
(
Row
(
context
,
children:
[
widget
.
pageTitleName
,
// InkResponse(
provider
.
resetForm
,
// onTap: () {
Row
(
// _showOptionsSheet(context);
children:
[
// },
// InkResponse(
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// onTap: () {
// ),
// _showOptionsSheet(context);
InkResponse
(
// },
onTap:
()
async
{
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
var
cf
=
Commondaterangefilter
();
// ),
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
InkResponse
(
if
(
result
!=
null
)
{
onTap:
()
async
{
var
dateRange
=
result
[
'dateRange'
]
as
DateTimeRange
?;
var
cf
=
Commondaterangefilter
();
print
(
"dateRange:
$dateRange
"
);
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
if
(
result
!=
null
)
{
var
dateRange
=
result
[
'dateRange'
]
as
DateTimeRange
?;
print
(
"dateRange:
$dateRange
"
);
var
formatted
=
result
[
'formatted'
]
as
List
<
String
>;
var
formatted
=
result
[
'formatted'
]
as
List
<
String
>;
print
(
"formatted:
$formatted
"
);
print
(
"formatted:
$formatted
"
);
if
(
formatted
.
isNotEmpty
)
{
if
(
formatted
.
isNotEmpty
)
{
var
fromDate
=
formatted
[
0
];
// From date
var
fromDate
=
formatted
[
0
];
// From date
var
toDate
=
formatted
[
1
];
// To date
var
toDate
=
formatted
[
1
];
// To date
print
(
"from_date:
$fromDate
"
);
print
(
"from_date:
$fromDate
"
);
print
(
"to_date:
$toDate
"
);
print
(
"to_date:
$toDate
"
);
provider
.
paymentsListAPI
(
context
,
fromDate
,
toDate
);
provider
.
paymentsListAPI
(
context
,
fromDate
,
toDate
);
// You can now use fromDate and toDate as needed
// You can now use fromDate and toDate as needed
// For example, store them or pass to another function
// For example, store them or pass to another function
}
else
{
print
(
"No valid date range selected"
);
}
}
else
{
}
else
{
print
(
"
No valid date range
select
ed
"
);
print
(
"
Bottom sheet closed without
select
ion
"
);
}
}
}
else
{
},
print
(
"Bottom sheet closed without selection"
);
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
}
),
},
],
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
),
),
],
),
),
)
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
body:
SafeArea
(
child:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
AppColors
.
app_blue
)
)):
requestLists
.
isNotEmpty
?
SizedBox
(
)):
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
Scrollba
r
(
child:
ListView
.
builde
r
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
()
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizont
al:
10
,
vertic
al:
10
,
vertical:
10
,
)
,
),
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizont
al:
10
,
vertic
al:
10
,
vertical:
10
,
)
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
child
:
Column
(
child
ren:
[
children:
[
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
Container
(
child:
Container
(
height:
50
,
height:
50
,
width:
35
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
)
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
"assets/svg/fin_ic.svg"
,
)
,
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
c
rossAxisAlignment
:
C
rossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
requestLists
[
index
].
receipientAccount
!,
requestLists
[
index
].
receipientAccount
!,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"₹
${requestLists[index].amount}
"
,
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
5
,
(
j
)
{
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
final
headings
=
[
"Receipt Account"
,
"Receipt Account"
,
"Attachment"
,
"Attachment"
,
"Request Mode"
,
"Request Mode"
,
"Receipt Date"
,
"Receipt Date"
,
"Note"
,
"Note"
,
];
];
final
subHeadings
=
[
final
subHeadings
=
[
requestLists
[
index
].
receipientAccount
,
requestLists
[
index
].
receipientAccount
,
"View"
,
"View"
,
requestLists
[
index
].
requestMode
,
requestLists
[
index
].
requestMode
,
// requestLists[index].attachmentDirFilePath
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
receiptDate
,
requestLists
[
index
].
receiptDate
,
requestLists
[
index
].
description
,
requestLists
[
index
].
description
,
];
];
if
(
headings
[
j
]==
"Attachment"
&&
requestLists
[
index
]
if
(
headings
[
j
]==
"Attachment"
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
){
.
attachmentViewFileName
==
""
){
return
SizedBox
.
shrink
();
return
SizedBox
.
shrink
();
}
}
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
child:
Text
(
subH
eadings
[
j
]
==
""
?
"-"
:
subHeadings
[
j
]??
"-"
,
h
eadings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
Expanded
(
],
child:
InkResponse
(
),
onTap:
);
j
!=
1
}),
?
null
InkResponse
(
:
()
{
onTap:
()
async
{
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
(
context
)
=>
context
,
Paymentreceiptdetails
(
)
=>
Fileviewer
(
pageName:
widget
.
pageTitleName
,
fileName:
paymentRequestId:
requestLists
[
index
]
requestLists
[
index
].
id
,
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
subHeadings
[
j
]==
""
?
"-"
:
subHeadings
[
j
]??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
],
),
),
);
);
if
(
res
==
true
){
}),
provider
.
paymentsListAPI
(
context
,
''
,
''
);
InkResponse
(
}
onTap:
()
async
{
},
var
res
=
await
Navigator
.
push
(
child:
Container
(
context
,
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
MaterialPageRoute
(
child:
Row
(
builder:
crossAxisAlignment:
(
context
)
=>
CrossAxisAlignment
.
center
,
Paymentreceiptdetails
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
pageName:
widget
.
pageTitleName
,
children:
[
paymentRequestId:
Text
(
requestLists
[
index
].
id
,
"View Details"
,
),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
),
],
);
if
(
res
==
true
){
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},
}
,
)
,
),
),
)
,
)
:
Emptywidget
(
context
)
)
:
Emptywidget
(
context
),)
)
,
),
),
);
);
},
},
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -122,17 +124,19 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -122,17 +124,19 @@ class _SubmitpaymentrequestionlistsbymodeState
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
child:
Scaffold
(
context
,
resizeToAvoidBottomInset:
true
,
"
${widget.pageTitleName}
"
,
backgroundColor:
AppColors
.
white
,
provider
.
resetForm
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"
${widget.pageTitleName}
"
,
body:
SafeArea
(
provider
.
resetForm
,
child:
Container
(
SizedBox
(
width:
0
),
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
...
@@ -229,7 +233,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -229,7 +233,7 @@ class _SubmitpaymentrequestionlistsbymodeState
)
??
)
??
false
;
false
;
},
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
),
onMenuStateChange:
(
isOpen
)
{
onMenuStateChange:
(
isOpen
)
{
...
@@ -293,7 +297,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -293,7 +297,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
),
),
errorWidget
(
context
,
provider
.
selectAccountError
),
errorWidget
(
context
,
provider
.
selectAccountError
),
if
([
"self"
,
"admin"
].
contains
(
widget
.
mode
))
...[
if
([
"self"
,
"admin"
].
contains
(
widget
.
mode
))
...[
TextWidget
(
context
,
"Select Requisition Type"
),
TextWidget
(
context
,
"Select Requisition Type"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
...
@@ -323,14 +327,14 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -323,14 +327,14 @@ class _SubmitpaymentrequestionlistsbymodeState
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectReqPurpose
,
value:
provider
.
selectReqPurpose
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
provider
.
selectReqPurpose
=
value
;
provider
.
selectReqPurpose
=
value
;
print
(
print
(
"Selected Complaint Type:
${value}
,"
,
"Selected Complaint Type:
${value}
,"
,
);
);
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
selectReqPurpose
provider
.
selectReqPurpose
...
@@ -363,7 +367,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -363,7 +367,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
],
],
errorWidget
(
context
,
provider
.
reqPurposeError
),
errorWidget
(
context
,
provider
.
reqPurposeError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
descController
,
provider
.
descController
,
...
@@ -378,7 +382,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -378,7 +382,7 @@ class _SubmitpaymentrequestionlistsbymodeState
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
descriptionError
),
errorWidget
(
context
,
provider
.
descriptionError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amountController
,
provider
.
amountController
,
...
@@ -393,7 +397,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -393,7 +397,7 @@ class _SubmitpaymentrequestionlistsbymodeState
TextInputAction
.
done
,
TextInputAction
.
done
,
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
TextWidget
(
context
,
"Select Payment Mode"
),
TextWidget
(
context
,
"Select Payment Mode"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
...
@@ -450,7 +454,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -450,7 +454,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
),
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
if
(
widget
.
mode
==
"other"
)...[
if
(
widget
.
mode
==
"other"
)...[
TextWidget
(
context
,
"Select Approval Employee"
),
TextWidget
(
context
,
"Select Approval Employee"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
...
@@ -509,7 +513,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -509,7 +513,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
],
],
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
...
@@ -569,7 +573,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -569,7 +573,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
],
],
errorWidget
(
context
,
provider
.
FileError
),
errorWidget
(
context
,
provider
.
FileError
),
if
([
if
([
"Cheque"
,
"Cheque"
,
"RTGS"
,
"RTGS"
,
...
@@ -590,7 +594,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -590,7 +594,7 @@ class _SubmitpaymentrequestionlistsbymodeState
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankNameError
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankBranchController
,
provider
.
bankBranchController
,
...
@@ -605,7 +609,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -605,7 +609,7 @@ class _SubmitpaymentrequestionlistsbymodeState
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankBranchError
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankAccNumberController
,
provider
.
bankAccNumberController
,
...
@@ -620,7 +624,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -620,7 +624,7 @@ class _SubmitpaymentrequestionlistsbymodeState
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankNumberError
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankIfscController
,
provider
.
bankIfscController
,
...
@@ -635,7 +639,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -635,7 +639,7 @@ class _SubmitpaymentrequestionlistsbymodeState
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
],
],
if
([
if
([
"Cheque"
,
"Cheque"
,
"RTGS"
,
"RTGS"
,
...
@@ -677,44 +681,44 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -677,44 +681,44 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
),
),
),
),
),
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
false
;
provider
.
addPaymentRequestionSubmitAPI
(
context
,
widget
.
mode
,
provider
.
selectedApprovalEmployeeID
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClicked
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
?
null
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
:
()
{
)
provider
.
submitClicked
=
false
;
:
Text
(
"Submit"
,
provider
.
addPaymentRequestionSubmitAPI
(
style:
TextStyle
(
context
,
fontSize:
15
,
widget
.
mode
,
fontFamily:
"JakartaMedium"
,
provider
.
selectedApprovalEmployeeID
color:
Colors
.
white
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
),
...
...
lib/screens/genTracker/ComplaintHistory.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -43,12 +45,14 @@ class _ComplainthistoryState extends State<Complainthistory> {
...
@@ -43,12 +45,14 @@ class _ComplainthistoryState extends State<Complainthistory> {
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Complaint History"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
appBar:
appbar
(
context
,
"Complaint History"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
...
...
lib/screens/genTracker/GenTrackerDashboard.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
...
@@ -29,12 +31,14 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
...
@@ -29,12 +31,14 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
];
];
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Gen Tracker"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Column
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Tracker"
),
body:
Column
(
children:
[
children:
[
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
...
...
lib/screens/genTracker/GeneratorDetails.dart
View file @
ecd8fcd1
...
@@ -69,17 +69,19 @@ class _GeneratordetailsState extends State<Generatordetails> {
...
@@ -69,17 +69,19 @@ class _GeneratordetailsState extends State<Generatordetails> {
var
sendwidget
=
SizedBox
(
width:
0
);
var
sendwidget
=
SizedBox
(
width:
0
);
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
"Generator Details"
,
resizeToAvoidBottomInset:
true
,
provider
.
resetForm
,
appBar:
appbar2
(
sendwidget
,
context
,
),
"Generator Details"
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
provider
.
resetForm
,
body:
SafeArea
(
sendwidget
,
child:
Container
(
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -818,45 +820,45 @@ class _GeneratordetailsState extends State<Generatordetails> {
...
@@ -818,45 +820,45 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
),
),
),
),
),
floatingActionButton:
Align
(
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
child:
InkWell
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
(
context
)
=>
Complainthistory
(
genHashID:
provider
.
genHashID
),
Complainthistory
(
genHashID:
provider
.
genHashID
),
),
);
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
),
);
child:
Center
(
},
child:
Text
(
child:
Container
(
"Complaint History"
,
alignment:
Alignment
.
bottomCenter
,
textAlign:
TextAlign
.
center
,
height:
45
,
style:
TextStyle
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
fontFamily:
"JakartaMedium"
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
fontSize:
15
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
AppColors
.
app_blue
,
),
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Center
(
child:
Text
(
"Complaint History"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
15
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
),
);
);
},
},
...
...
lib/screens/genTracker/RegisterComplaint.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -26,12 +28,14 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -26,12 +28,14 @@ class _RegistercomplaintState extends State<Registercomplaint> {
builder:
(
context
,
provider
,
homeProvider
,
child
)
{
builder:
(
context
,
provider
,
homeProvider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Register Complaint"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Register Complaint"
),
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -39,7 +43,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -39,7 +43,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
SizedBox
(
height:
5.0
),
SizedBox
(
height:
5.0
),
Container
(
Container
(
padding:
EdgeInsets
.
fromLTRB
(
10
,
0
,
10
,
0
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
0
,
10
,
0
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
...
@@ -62,7 +66,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -62,7 +66,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
borderRadius:
BorderRadius
.
circular
(
16
)
borderRadius:
BorderRadius
.
circular
(
16
)
),
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
...
@@ -75,7 +79,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -75,7 +79,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
9
,
flex:
9
,
child:
SizedBox
(
child:
SizedBox
(
...
@@ -152,8 +156,8 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -152,8 +156,8 @@ class _RegistercomplaintState extends State<Registercomplaint> {
);
);
}),
}),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
],
],
),
),
),
),
...
@@ -196,7 +200,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -196,7 +200,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
'Select Complaint Type'
,
'Select Complaint Type'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
...
@@ -323,7 +327,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -323,7 +327,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
],
],
),
),
),
),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
...
@@ -393,7 +397,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -393,7 +397,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
],
],
),
),
),
),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
...
@@ -403,7 +407,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -403,7 +407,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
),
),
Container
(
Container
(
height:
50
,
height:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
...
@@ -420,7 +424,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -420,7 +424,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
hintText:
"Enter Running Number"
,
"Enter Running Number"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
...
@@ -428,13 +432,13 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -428,13 +432,13 @@ class _RegistercomplaintState extends State<Registercomplaint> {
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
),
),
enabledBorder:
enabledBorder:
InputBorder
.
none
,
InputBorder
.
none
,
focusedBorder:
focusedBorder:
InputBorder
.
none
,
InputBorder
.
none
,
),
),
),
),
),
),
),
),
...
@@ -447,7 +451,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -447,7 +451,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
),
),
Container
(
Container
(
height:
150
,
height:
150
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
...
@@ -465,7 +469,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -465,7 +469,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
hintText:
"Enter Message"
,
"Enter Message"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
...
@@ -473,22 +477,22 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -473,22 +477,22 @@ class _RegistercomplaintState extends State<Registercomplaint> {
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
),
),
enabledBorder:
enabledBorder:
InputBorder
.
none
,
InputBorder
.
none
,
focusedBorder:
focusedBorder:
InputBorder
.
none
,
InputBorder
.
none
,
),
),
),
),
),
),
),
),
],
],
),
),
),
),
SizedBox
(
height:
65.0
),
SizedBox
(
height:
65.0
),
],
],
),
),
),
),
...
@@ -496,41 +500,41 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -496,41 +500,41 @@ class _RegistercomplaintState extends State<Registercomplaint> {
),
),
),
),
),
),
),
floatingActionButton:
Container
(
floatingActionButton:
Container
(
child:
InkWell
(
child:
InkWell
(
onTap:
()
{
onTap:
()
{
provider
.
SubmitComplaintFunction
(
provider
.
SubmitComplaintFunction
(
context
,
context
,
homeProvider
,
homeP
rovider
,
p
rovider
.
genID
,
provider
.
genID
,
provider
.
selectedTypeId
,
provider
.
selected
Type
Id
,
provider
.
selected
Description
Id
,
provider
.
selectedDescriptionId
,
running_hrs
.
text
,
running_hrs
.
text
,
Complaint_Note
.
text
);
Complaint_Note
.
text
);
},
},
child:
Container
(
child:
Contain
er
(
alignment:
Alignment
.
cent
er
,
alignment:
Alignment
.
center
,
height:
45
,
he
ight:
45
,
margin:
EdgeInsets
.
only
(
left:
15.0
,
r
ight:
15.0
)
,
margin:
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
10.0
)
,
borderRadius:
BorderRadius
.
circular
(
10.0
),
),
),
child:
Text
(
child:
Text
(
"Submit Complaint"
,
"Submit Complaint"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
15
,
fontSize:
15
,
color:
Colors
.
white
color:
Colors
.
white
),
),
),
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
),
);
);
},
},
...
...
lib/screens/genTracker/ScanEnterGeneratorIDScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:generp/Notifiers/GeneratorDetailsProvider.dart'
;
import
'package:generp/Notifiers/GeneratorDetailsProvider.dart'
;
import
'package:generp/Utils/commonServices.dart'
;
import
'package:generp/Utils/commonServices.dart'
;
...
@@ -59,21 +61,23 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
...
@@ -59,21 +61,23 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"
${widget.from}
"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"
${widget.from}
"
),
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Spacer
(),
Spacer
(),
SizedBox
(
SizedBox
(
height:
250
,
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
provider
.
title
,
context
);
provider
.
onQRViewCreated
(
p0
,
provider
.
title
,
context
);
...
@@ -81,7 +85,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
...
@@ -81,7 +85,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderRadius:
20
,
borderLength:
60
,
borderLength:
60
,
...
...
lib/screens/inventory/GeneratorPartDetailsScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
import
'package:generp/screens/notifierExports.dart'
;
import
'package:generp/screens/notifierExports.dart'
;
...
@@ -58,12 +60,14 @@ class _GeneratorPartDetailsScreenState
...
@@ -58,12 +60,14 @@ class _GeneratorPartDetailsScreenState
onRefresh:
()
async
{
onRefresh:
()
async
{
initialiseFunction
(
context
,
homeProvider
);
initialiseFunction
(
context
,
homeProvider
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
body:
Container
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
...
...
lib/screens/inventory/InventoryScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/notifierExports.dart'
;
import
'package:generp/screens/notifierExports.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
...
@@ -37,30 +39,32 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -37,30 +39,32 @@ class _InventoryScreenState extends State<InventoryScreen> {
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Spacer
(),
Spacer
(),
Container
(
Container
(
height:
250
,
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
},
},
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderRadius:
20
,
borderLength:
60
,
borderLength:
60
,
...
...
lib/screens/order/addOrder.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -61,86 +63,44 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -61,86 +63,44 @@ class _AddorderScreenState extends State<AddorderScreen> {
return
Consumer
<
Addorderprovider
>(
return
Consumer
<
Addorderprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
child:
Scaffold
(
context
,
resizeToAvoidBottomInset:
true
,
"
${widget.pageTitleName}
"
,
backgroundColor:
AppColors
.
white
,
provider
.
resetForm
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"
${widget.pageTitleName}
"
,
body:
Container
(
provider
.
resetForm
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
SizedBox
(
width:
0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
SingleChildScrollView
(
body:
Container
(
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
TextWidget
(
context
,
"Account"
),
borderRadius:
BorderRadius
.
circular
(
20
),
InkResponse
(
),
onTap:
()
{
child:
SingleChildScrollView
(
if
(
focusNode
.
hasFocus
)
{
child:
Column
(
focusNode
.
unfocus
();
crossAxisAlignment:
CrossAxisAlignment
.
start
,
}
else
{
children:
[
FocusScope
.
of
(
context
).
requestFocus
(
focusNode
);
TextWidget
(
context
,
"Account"
),
}
InkResponse
(
},
onTap:
()
{
child:
Container
(
if
(
focusNode
.
hasFocus
)
{
alignment:
Alignment
.
center
,
focusNode
.
unfocus
();
decoration:
BoxDecoration
(
}
else
{
color:
AppColors
.
text_field_color
,
FocusScope
.
of
(
context
).
requestFocus
(
focusNode
);
borderRadius:
BorderRadius
.
circular
(
14
),
}
),
},
child:
ListTile
(
child:
Container
(
onTap:
()
{
alignment:
Alignment
.
center
,
if
(
focusNode
.
hasFocus
)
{
decoration:
BoxDecoration
(
focusNode
.
unfocus
();
color:
AppColors
.
text_field_color
,
}
else
{
borderRadius:
BorderRadius
.
circular
(
14
),
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
),
),
),
),
),
child:
ListTile
(
trailing:
InkResponse
(
onTap:
()
{
onTap:
()
{
if
(
focusNode
.
hasFocus
)
{
if
(
focusNode
.
hasFocus
)
{
focusNode
.
unfocus
();
focusNode
.
unfocus
();
...
@@ -148,97 +108,254 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -148,97 +108,254 @@ class _AddorderScreenState extends State<AddorderScreen> {
FocusScope
.
of
(
context
).
requestFocus
(
focusNode
);
FocusScope
.
of
(
context
).
requestFocus
(
focusNode
);
}
}
},
},
child:
SvgPicture
.
asset
(
title:
TextFormField
(
"assets/svg/arrow_dropdown.svg"
,
focusNode:
focusNode
,
height:
25
,
onTapUpOutside:
(
event
)
{
width:
20
,
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
&&
if
(
provider
.
accountList
.
isNotEmpty
&&
focusNode
.
hasFocus
)
...[
focusNode
.
hasFocus
)
...[
Card
(
Card
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
height:
widget
.
mode
==
"self"
?
50
:
150
,
height:
widget
.
mode
==
"self"
?
50
:
150
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Scrollbar
(
child:
Scrollbar
(
thickness:
2.5
,
thickness:
2.5
,
radius:
Radius
.
circular
(
6
),
radius:
Radius
.
circular
(
6
),
thumbVisibility:
true
,
thumbVisibility:
true
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
provider
.
accountList
.
length
,
itemCount:
provider
.
accountList
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
if
(
provider
.
accountList
.
isNotEmpty
)
{
if
(
provider
.
accountList
.
isNotEmpty
)
{
provider
.
selectedAccountList
=
provider
.
selectedAccountList
=
provider
.
accountList
[
index
];
provider
.
accountList
[
index
];
print
(
print
(
"Selected Complaint Type:
${provider.accountList[index].text}
, ID:
${provider.accountList[index].id}
"
,
"Selected Complaint Type:
${provider.accountList[index].text}
, ID:
${provider.accountList[index].id}
"
,
);
);
provider
.
selectedAccountID
=
provider
.
selectedAccountID
=
provider
.
accountList
[
index
].
id
!;
provider
.
accountList
[
index
].
id
!;
provider
.
selectedAccountName
=
provider
.
selectedAccountName
=
provider
.
accountList
[
index
].
text
!;
provider
.
accountList
[
index
].
text
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
selectedAccountID
provider
.
selectedAccountID
.
toString
(),
.
toString
(),
);
);
provider
.
dropDownSearchController
.
text
=
provider
.
dropDownSearchController
.
text
=
provider
.
accountList
[
index
].
text
!;
provider
.
accountList
[
index
].
text
!;
provider
provider
.
ordersAddOrderAccountDetailsAPIFunction
(
.
ordersAddOrderAccountDetailsAPIFunction
(
context
,
context
,
provider
.
selectedAccountID
,
provider
.
selectedAccountID
,
);
);
}
// provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
provider
.
accountList
=
[];
},
child:
SizedBox
(
height:
45
,
child:
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
provider
.
accountList
[
index
].
text
!,
),
),
),
);
},
),
),
),
),
],
errorWidget
(
context
,
provider
.
selectAccountError
),
if
(
widget
.
mode
==
"admin"
)
...[
TextWidget
(
context
,
"Sales Person"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Employees
>(
isExpanded:
true
,
hint:
Text
(
"Select Sales Person"
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
employees
.
map
(
(
e
)
=>
DropdownMenuItem
<
Employees
>(
value:
e
,
child:
Text
(
e
.
name
!,
style:
const
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedEmployees
,
onChanged:
(
Employees
?
value
)
{
if
(
provider
.
employees
.
isNotEmpty
)
{
provider
.
selectedEmployees
=
value
;
provider
.
selectedEmployeeID
=
value
!.
id
!;
provider
.
selectedEmployeeName
=
value
!.
name
!;
}
}
// provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
provider
.
accountList
=
[];
},
},
child:
SizedBox
(
buttonStyleData:
ddtheme
.
buttonStyleData
,
height:
45
,
iconStyleData:
ddtheme
.
iconStyleData
,
child:
Align
(
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
alignment:
Alignment
.
centerLeft
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
child:
Text
(
),
provider
.
accountList
[
index
].
text
!,
),
],
),
),
],
TextWidget
(
context
,
"Order Received Date"
),
GestureDetector
(
onTap:
()
{
provider
.
showDatePickerDialog
(
context
);
},
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
child:
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
controller:
provider
.
orderReceivedDateController
,
keyboardType:
TextInputType
.
text
,
enabled:
false
,
maxLines:
1
,
readOnly:
true
,
onChanged:
(
value
)
{},
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
)
;
)
,
}
,
)
,
),
),
)
,
]
,
),
),
),
),
],
errorWidget
(
context
,
provider
.
orderDateError
),
errorWidget
(
context
,
provider
.
selectAccountError
),
if
(
widget
.
mode
==
"admin"
)
...[
textControllerWidget
(
TextWidget
(
context
,
"Sales Person"
),
context
,
provider
.
billingNameController
,
"Billing Name"
,
"Enter Billing Name"
,
provider
.
onChangedBillingName
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
0
],
null
,
TextInputAction
.
done
,
),
errorWidget
(
context
,
provider
.
billingNameError
),
TextWidget
(
context
,
"Billing State"
),
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
Employe
es
>(
child:
DropdownButton2
<
Stat
es
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
"Select S
ales Person
"
,
"Select S
tate
"
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
employe
es
provider
.
billingStat
es
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
Employe
es
>(
(
e
)
=>
DropdownMenuItem
<
Stat
es
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
name
!,
e
.
name
!,
...
@@ -249,13 +366,61 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -249,13 +366,61 @@ class _AddorderScreenState extends State<AddorderScreen> {
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selec
tedEmploye
es
,
value:
provider
.
selec
etdBillingStat
es
,
onChanged:
(
Employe
es
?
value
)
{
onChanged:
(
Stat
es
?
value
)
{
if
(
provider
.
employe
es
.
isNotEmpty
)
{
if
(
provider
.
billingStat
es
.
isNotEmpty
)
{
provider
.
selec
tedEmploye
es
=
value
;
provider
.
selec
etdBillingStat
es
=
value
;
provider
.
selected
Employe
eID
=
value
!.
id
!;
provider
.
selected
BillingStat
eID
=
value
!.
id
!;
provider
.
selected
Employe
eName
=
provider
.
selected
BillingStat
eName
=
value
!.
name
!;
value
!.
name
!;
if
(
provider
.
billingDistricts
.
isNotEmpty
)
{
provider
.
billingDistricts
.
clear
();
// provider.selectedBillingDistricts=null;
provider
.
selectedBillingDistrictId
=
null
;
provider
.
selectedBillingDistrictValue
=
""
;
}
provider
.
getDistrictAPI
(
context
,
provider
.
selectedBillingStateID
,
);
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
billingStateSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
billingStateSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search Sate...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
billingStateSearchController
.
clear
();
}
}
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
...
@@ -267,1156 +432,997 @@ class _AddorderScreenState extends State<AddorderScreen> {
...
@@ -267,1156 +432,997 @@ class _AddorderScreenState extends State<AddorderScreen> {
],
],
),
),
),
),
],
errorWidget
(
context
,
provider
.
selectedBillingStateError
),
TextWidget
(
context
,
"Order Received Date"
),
TextWidget
(
context
,
"Billing District"
),
GestureDetector
(
//dd
onTap:
()
{
DropdownButtonHideUnderline
(
provider
.
showDatePickerDialog
(
context
);
child:
Row
(
},
children:
[
child:
Row
(
Expanded
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
child:
DropdownButton2
<
Districts
>(
children:
[
isExpanded:
true
,
Expanded
(
hint:
Text
(
child:
Container
(
"Select District"
,
height:
50
,
style:
const
TextStyle
(
fontSize:
14
),
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
controller:
provider
.
orderReceivedDateController
,
keyboardType:
TextInputType
.
text
,
enabled:
false
,
maxLines:
1
,
readOnly:
true
,
onChanged:
(
value
)
{},
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
items:
),
provider
.
billingDistricts
),
.
map
(
],
(
e
)
=>
DropdownMenuItem
<
Districts
>(
),
value:
e
,
),
child:
Text
(
errorWidget
(
context
,
provider
.
orderDateError
),
e
.
district
!,
style:
const
TextStyle
(
textControllerWidget
(
fontSize:
14
,
context
,
),
provider
.
billingNameController
,
"Billing Name"
,
"Enter Billing Name"
,
provider
.
onChangedBillingName
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
0
],
null
,
TextInputAction
.
done
,
),
errorWidget
(
context
,
provider
.
billingNameError
),
TextWidget
(
context
,
"Billing State"
),
//dd
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
States
>(
isExpanded:
true
,
hint:
Text
(
"Select State"
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
billingStates
.
map
(
(
e
)
=>
DropdownMenuItem
<
States
>(
value:
e
,
child:
Text
(
e
.
name
!,
style:
const
TextStyle
(
fontSize:
14
,
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedBillingDistricts
,
value:
provider
.
selecetdBillingStates
,
onChanged:
(
Districts
?
value
)
{
onChanged:
(
States
?
value
)
{
if
(
provider
.
billingStates
.
isNotEmpty
)
{
provider
.
selecetdBillingStates
=
value
;
provider
.
selectedBillingStateID
=
value
!.
id
!;
provider
.
selectedBillingStateName
=
value
!.
name
!;
if
(
provider
.
billingDistricts
.
isNotEmpty
)
{
if
(
provider
.
billingDistricts
.
isNotEmpty
)
{
provider
.
billingDistricts
.
clear
();
provider
.
selectedBillingDistricts
=
value
;
// provider.selectedBillingDistricts=null;
provider
.
selectedBillingDistrictId
=
provider
.
selectedBillingDistrictId
=
null
;
value
!.
id
!;
provider
.
selectedBillingDistrictValue
=
""
;
provider
.
selectedBillingDistrictValue
=
value
!.
district
!;
if
(
provider
.
billingSubLocations
.
isNotEmpty
)
{
provider
.
billingSubLocations
.
clear
();
// provider.selectedBillingSubLocations = null;
provider
.
selectedBillingSubLocID
=
null
;
provider
.
selectedBillingSubLocValue
=
""
;
}
provider
.
getSubLocationAPI
(
context
,
provider
.
selectedBillingDistrictId
,
);
}
}
},
provider
.
getDistrictAPI
(
dropdownSearchData:
DropdownSearchData
(
context
,
searchInnerWidgetHeight:
50
,
provider
.
selectedBillingStateID
,
searchController:
);
provider
.
billingDistrictSearchController
,
}
searchInnerWidget:
Padding
(
},
padding:
const
EdgeInsets
.
all
(
8
),
dropdownSearchData:
DropdownSearchData
(
child:
TextFormField
(
searchInnerWidgetHeight:
50
,
controller:
searchController:
provider
provider
.
billingStateSearchController
,
.
billingDistrictSearchController
,
searchInnerWidget:
Padding
(
decoration:
InputDecoration
(
padding:
const
EdgeInsets
.
all
(
8
),
isDense:
true
,
child:
TextFormField
(
contentPadding:
controller:
const
EdgeInsets
.
symmetric
(
provider
.
billingStateSearchController
,
horizontal:
10
,
decoration:
InputDecoration
(
vertical:
8
,
isDense:
true
,
),
contentPadding:
hintText:
'Search District...'
,
const
EdgeInsets
.
symmetric
(
border:
OutlineInputBorder
(
horizontal:
10
,
borderRadius:
BorderRadius
.
circular
(
8
),
vertical:
8
,
),
),
hintText:
'Search Sate...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
district
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
),
searchMatchFn:
(
item
,
searchValue
)
{
onMenuStateChange:
(
isOpen
)
{
return
item
.
value
?.
name
if
(!
isOpen
)
{
?.
toLowerCase
()
provider
.
billingDistrictSearchController
.
contains
(
.
clear
();
searchValue
.
toLowerCase
(),
}
)
??
false
;
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
billingStateSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectedBillingDistrictError
),
errorWidget
(
context
,
provider
.
selectedBillingStateError
),
TextWidget
(
context
,
"Billing Sub Location"
),
TextWidget
(
context
,
"Billing District"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
SubLocations
>(
child:
DropdownButton2
<
Districts
>(
hint:
Text
(
isExpanded:
true
,
"Select Sub Locality"
,
hint:
Text
(
style:
const
TextStyle
(
fontSize:
14
),
"Select District"
,
),
style:
const
TextStyle
(
fontSize:
14
),
items:
),
provider
.
billingSubLocations
items:
.
map
(
provider
.
billingDistricts
(
e
)
=>
DropdownMenuItem
<
SubLocations
>(
.
map
(
value:
e
,
(
e
)
=>
DropdownMenuItem
<
Districts
>(
child:
Text
(
value:
e
,
e
.
subLocality
!,
child:
Text
(
style:
const
TextStyle
(
e
.
district
!,
fontSize:
14
,
style:
const
TextStyle
(
),
fontSize:
14
,
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedBillingSubLocations
,
value:
provider
.
selectedBillingDistricts
,
onChanged:
(
SubLocations
?
value
)
{
onChanged:
(
Districts
?
value
)
{
if
(
provider
.
billingDistricts
.
isNotEmpty
)
{
provider
.
selectedBillingDistricts
=
value
;
provider
.
selectedBillingDistrictId
=
value
!.
id
!;
provider
.
selectedBillingDistrictValue
=
value
!.
district
!;
if
(
provider
.
billingSubLocations
.
isNotEmpty
)
{
if
(
provider
.
billingSubLocations
.
isNotEmpty
)
{
provider
.
b
illingSubLocations
.
clear
()
;
provider
.
selectedB
illingSubLocations
=
value
;
//
provider.selectedBillingSubLoc
ations = null
;
provider
.
selectedBillingSubLoc
ID
=
value
!.
id
!
;
provider
.
selectedBillingSubLoc
ID
=
null
;
provider
.
selectedBillingSubLoc
Value
=
provider
.
selectedBillingS
ubLoc
V
al
ue
=
""
;
value
!.
s
ubLocal
ity
!
;
}
}
provider
.
getSubLocationAPI
(
context
,
provider
.
selectedBillingDistrictId
,
);
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
billingDistrictSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
billingDistrictSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search District...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
district
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
},
),
dropdownSearchData:
DropdownSearchData
(
onMenuStateChange:
(
isOpen
)
{
searchInnerWidgetHeight:
50
,
if
(!
isOpen
)
{
searchController:
provider
.
billingDistrictSearchController
provider
.
billingSubLocSearchController
,
.
clear
();
searchInnerWidget:
Padding
(
}
padding:
const
EdgeInsets
.
all
(
8
),
},
child:
TextFormField
(
buttonStyleData:
ddtheme
.
buttonStyleData
,
controller:
iconStyleData:
ddtheme
.
iconStyleData
,
provider
.
billingSubLocSearchController
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
decoration:
InputDecoration
(
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
isDense:
true
,
),
contentPadding:
),
const
EdgeInsets
.
symmetric
(
],
horizontal:
10
,
),
vertical:
8
,
),
errorWidget
(
context
,
provider
.
selectedBillingDistrictError
),
TextWidget
(
context
,
"Billing Sub Location"
),
//dd
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
SubLocations
>(
hint:
Text
(
"Select Sub Locality"
,
style:
const
TextStyle
(
fontSize:
14
),
),
items:
provider
.
billingSubLocations
.
map
(
(
e
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
e
,
child:
Text
(
e
.
subLocality
!,
style:
const
TextStyle
(
fontSize:
14
,
),
),
),
hintText:
'Search Sub Location...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
)
.
toList
(),
value:
provider
.
selectedBillingSubLocations
,
onChanged:
(
SubLocations
?
value
)
{
if
(
provider
.
billingSubLocations
.
isNotEmpty
)
{
provider
.
selectedBillingSubLocations
=
value
;
provider
.
selectedBillingSubLocID
=
value
!.
id
!;
provider
.
selectedBillingSubLocValue
=
value
!.
subLocality
!;
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
billingSubLocSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
billingSubLocSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search Sub Location...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
subLocality
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
),
searchMatchFn:
(
item
,
searchValue
)
{
onMenuStateChange:
(
isOpen
)
{
return
item
.
value
?.
subLocality
if
(!
isOpen
)
{
?.
toLowerCase
()
provider
.
billingSubLocSearchController
.
contains
(
.
clear
();
searchValue
.
toLowerCase
(),
}
)
??
false
;
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
billingSubLocSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectedBillingSubLocError
),
errorWidget
(
context
,
provider
.
selectedBillingSubLocError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
billingAddressController
,
provider
.
billingAddressController
,
"Billing Address"
,
"Billing Address"
,
"Enter Billing Address"
,
"Enter Billing Address"
,
provider
.
onChangedBillingAddress
,
provider
.
onChangedBillingAddress
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
1
],
focusNodes
[
1
],
focusNodes
[
2
],
focusNodes
[
2
],
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
billingAddressError
),
errorWidget
(
context
,
provider
.
billingAddressError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
billingPincodeController
,
provider
.
billingPincodeController
,
"Billing Pin code"
,
"Billing Pin code"
,
"Enter Billing Pin code"
,
"Enter Billing Pin code"
,
provider
.
onChangedBillingPincode
,
provider
.
onChangedBillingPincode
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
2
],
focusNodes
[
2
],
null
,
null
,
TextInputAction
.
done
,
TextInputAction
.
done
,
6
,
6
,
),
),
errorWidget
(
context
,
provider
.
billingPincodeError
),
errorWidget
(
context
,
provider
.
billingPincodeError
),
TextWidget
(
context
,
"Dispatch State"
),
TextWidget
(
context
,
"Dispatch State"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
States
>(
child:
DropdownButton2
<
States
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
"Select State"
,
"Select State"
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
dispatchStates
provider
.
dispatchStates
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
States
>(
(
e
)
=>
DropdownMenuItem
<
States
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
name
!,
e
.
name
!,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selecetdDispatchStates
,
value:
provider
.
selecetdDispatchStates
,
onChanged:
(
States
?
value
)
{
onChanged:
(
States
?
value
)
{
if
(
provider
.
dispatchStates
.
isNotEmpty
)
{
if
(
provider
.
dispatchStates
.
isNotEmpty
)
{
provider
.
selecetdDispatchStates
=
value
;
provider
.
selecetdDispatchStates
=
value
;
provider
.
selectedDispatchStateID
=
value
!.
id
!;
provider
.
selectedDispatchStateID
=
value
!.
id
!;
provider
.
selectedDispatchStateName
=
provider
.
selectedDispatchStateName
=
value
!.
name
!;
value
!.
name
!;
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
provider
.
dispatchDistricts
.
clear
();
provider
.
dispatchDistricts
.
clear
();
// provider.selectedDispatchDistricts = null;
// provider.selectedDispatchDistricts = null;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictValue
=
""
;
provider
.
selectedDispatchDistrictValue
=
""
;
}
provider
.
getDispatchDistrictAPI
(
context
,
provider
.
selectedDispatchStateID
,
);
}
}
provider
.
getDispatchDistrictAPI
(
},
context
,
dropdownSearchData:
DropdownSearchData
(
provider
.
selectedDispatchStateID
,
searchInnerWidgetHeight:
50
,
);
searchController:
}
provider
.
dispatchStateSearchController
,
},
searchInnerWidget:
Padding
(
dropdownSearchData:
DropdownSearchData
(
padding:
const
EdgeInsets
.
all
(
8
),
searchInnerWidgetHeight:
50
,
child:
TextFormField
(
searchController:
controller:
provider
.
dispatchStateSearchController
,
provider
.
dispatchStateSearchController
,
searchInnerWidget:
Padding
(
decoration:
InputDecoration
(
padding:
const
EdgeInsets
.
all
(
8
),
isDense:
true
,
child:
TextFormField
(
contentPadding:
controller:
const
EdgeInsets
.
symmetric
(
provider
.
dispatchStateSearchController
,
horizontal:
10
,
decoration:
InputDecoration
(
vertical:
8
,
isDense:
true
,
),
contentPadding:
hintText:
'Search Sate...'
,
const
EdgeInsets
.
symmetric
(
border:
OutlineInputBorder
(
horizontal:
10
,
borderRadius:
BorderRadius
.
circular
(
8
),
vertical:
8
,
),
),
hintText:
'Search Sate...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
),
searchMatchFn:
(
item
,
searchValue
)
{
onMenuStateChange:
(
isOpen
)
{
return
item
.
value
?.
name
if
(!
isOpen
)
{
?.
toLowerCase
()
provider
.
dispatchStateSearchController
.
contains
(
.
clear
();
searchValue
.
toLowerCase
(),
}
)
??
false
;
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
dispatchStateSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectedDispatchStateError
),
errorWidget
(
context
,
provider
.
selectedDispatchStateError
),
//dd
//dd
TextWidget
(
context
,
"Dispatch District"
),
TextWidget
(
context
,
"Dispatch District"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
Districts
>
(
child:
DropdownButton2
<
Districts
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
"Select District"
,
"Select District"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
dispatchDistricts
provider
.
dispatchDistricts
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
Districts
>
(
(
e
)
=>
DropdownMenuItem
<
Districts
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
district
!,
e
.
district
!,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedDispatchDistricts
,
value:
provider
.
selectedDispatchDistricts
,
onChanged:
(
Districts
?
value
)
{
onChanged:
(
Districts
?
value
)
{
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
provider
.
selectedDispatchDistricts
=
value
;
provider
.
selectedDispatchDistricts
=
value
;
provider
.
selectedDispatchDistrictId
=
provider
.
selectedDispatchDistrictId
=
value
!.
id
!;
value
!.
id
!;
provider
.
selectedDispatchDistrictValue
=
provider
.
selectedDispatchDistrictValue
=
value
!.
district
!;
value
!.
district
!;
if
(
provider
if
(
provider
.
dispatchSubLocations
.
dispatchSubLocations
.
isNotEmpty
)
{
.
isNotEmpty
)
{
provider
.
dispatchSubLocations
.
clear
();
provider
.
dispatchSubLocations
.
clear
();
// provider.selectedDispatchSubLocations=null;
// provider.selectedDispatchSubLocations=null;
provider
.
selectedDispatchSubLocID
=
null
;
provider
.
selectedDispatchSubLocID
=
null
;
provider
.
selectedDispatchSubLocValue
=
""
;
provider
.
selectedDispatchSubLocValue
=
""
;
}
provider
.
getDispatchSubLocationAPI
(
context
,
provider
.
selectedDispatchDistrictId
,
);
}
}
provider
.
getDispatchSubLocationAPI
(
},
context
,
dropdownSearchData:
DropdownSearchData
(
provider
.
selectedDispatchDistrictId
,
searchInnerWidgetHeight:
50
,
);
searchController:
}
provider
.
dispatchDistrictSearchController
,
},
searchInnerWidget:
Padding
(
dropdownSearchData:
DropdownSearchData
(
padding:
const
EdgeInsets
.
all
(
8
),
searchInnerWidgetHeight:
50
,
child:
TextFormField
(
searchController:
controller:
provider
.
dispatchDistrictSearchController
,
provider
searchInnerWidget:
Padding
(
.
dispatchDistrictSearchController
,
padding:
const
EdgeInsets
.
all
(
8
),
decoration:
InputDecoration
(
child:
TextFormField
(
isDense:
true
,
controller:
contentPadding:
provider
const
EdgeInsets
.
symmetric
(
.
dispatchDistrictSearchController
,
horizontal:
10
,
decoration:
InputDecoration
(
vertical:
8
,
isDense:
true
,
),
contentPadding:
hintText:
'Search District...'
,
const
EdgeInsets
.
symmetric
(
border:
OutlineInputBorder
(
horizontal:
10
,
borderRadius:
BorderRadius
.
circular
(
8
),
vertical:
8
,
),
),
hintText:
'Search District...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
district
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
),
searchMatchFn:
(
item
,
searchValue
)
{
onMenuStateChange:
(
isOpen
)
{
return
item
.
value
?.
district
if
(!
isOpen
)
{
?.
toLowerCase
()
provider
.
dispatchDistrictSearchController
.
contains
(
.
clear
();
searchValue
.
toLowerCase
(),
}
)
??
false
;
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
dispatchDistrictSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectedDispatchDistrictError
),
error
Widget
(
context
,
provider
.
selectedDispatchDistrictError
),
Text
Widget
(
context
,
"Dispatch Sub Location"
),
TextWidget
(
context
,
"Dispatch Sub Location"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
SubLocations
>
(
child:
DropdownButton2
<
SubLocations
>
(
hint:
Text
(
hint:
Text
(
"Select Sub Locality"
,
"Select Sub Locality"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
dispatchSubLocations
provider
.
dispatchSubLocations
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
SubLocations
>
(
(
e
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
e
,
value:
e
,
child:
Text
(
child:
Text
(
e
.
subLocality
!,
e
.
subLocality
!,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
)
.
toList
(),
value:
provider
.
selectedDispatchSubLocations
,
onChanged:
(
SubLocations
?
value
)
{
if
(
provider
.
dispatchSubLocations
.
isNotEmpty
)
{
provider
.
selectedDispatchSubLocations
=
value
;
provider
.
selectedDispatchSubLocID
=
value
!.
id
!;
provider
.
selectedDispatchSubLocValue
=
value
!.
subLocality
!;
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
dispatchSubLocSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
dispatchSubLocSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search Sub Location...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
)
.
toList
(),
value:
provider
.
selectedDispatchSubLocations
,
onChanged:
(
SubLocations
?
value
)
{
if
(
provider
.
dispatchSubLocations
.
isNotEmpty
)
{
provider
.
selectedDispatchSubLocations
=
value
;
provider
.
selectedDispatchSubLocID
=
value
!.
id
!;
provider
.
selectedDispatchSubLocValue
=
value
!.
subLocality
!;
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
dispatchSubLocSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
dispatchSubLocSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search Sub Location...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
subLocality
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
),
searchMatchFn:
(
item
,
searchValue
)
{
onMenuStateChange:
(
isOpen
)
{
return
item
.
value
?.
subLocality
if
(!
isOpen
)
{
?.
toLowerCase
()
provider
.
dispatchSubLocSearchController
.
contains
(
.
clear
();
searchValue
.
toLowerCase
(),
}
)
??
false
;
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
dispatchSubLocSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectedDispatchSubLocError
),
errorWidget
(
context
,
provider
.
selectedDispatchSubLocError
),
//dd
//dd
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
dispatchAddressController
,
provider
.
dispatchAddressController
,
"Dispatch Address"
,
"Dispatch Address"
,
"Enter Dispatch Address"
,
"Enter Dispatch Address"
,
provider
.
onChangedDispatchAddress
,
provider
.
onChangedDispatchAddress
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
3
],
focusNodes
[
3
],
focusNodes
[
4
],
focusNodes
[
4
],
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
dispatchAddressError
),
errorWidget
(
context
,
provider
.
dispatchAddressError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
dispatchPincodeController
,
provider
.
dispatchPincodeController
,
"Dispatch Pin code"
,
"Dispatch Pin code"
,
"Enter Dispatch Pin code"
,
"Enter Dispatch Pin code"
,
provider
.
onChangedDispatchPincode
,
provider
.
onChangedDispatchPincode
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
4
],
focusNodes
[
4
],
focusNodes
[
5
],
focusNodes
[
5
],
TextInputAction
.
next
,
TextInputAction
.
next
,
6
,
6
,
),
),
errorWidget
(
context
,
provider
.
dispatchPincodeError
),
errorWidget
(
context
,
provider
.
dispatchPincodeError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
gstController
,
provider
.
gstController
,
"GST Number"
,
"GST Number"
,
"Enter GST Number"
,
"Enter GST Number"
,
provider
.
onChangedGst
,
provider
.
onChangedGst
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
5
],
focusNodes
[
5
],
null
,
null
,
TextInputAction
.
done
,
TextInputAction
.
done
,
),
),
errorWidget
(
context
,
provider
.
gstError
),
errorWidget
(
context
,
provider
.
gstError
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Upload Purchase Order"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
),
),
child:
Center
(
),
child:
Text
(
),
"Upload Purchase Order"
,
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaMedium"
,
fontSize:
11
,
color:
AppColors
.
app_blue
,
fontWeight:
FontWeight
.
w600
,
),
),
),
),
InkResponse
(
),
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
),
),
),
],
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
TextWidget
(
context
,
"Unloading Scope"
),
Padding
(
//dd
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Expanded
(
Text
(
child:
DropdownButton2
<
String
>(
"
${provider.imagePath}
"
,
hint:
Text
(
style:
TextStyle
(
"Select Unloading Scope"
,
color:
AppColors
.
semi_black
,
style:
const
TextStyle
(
fontSize:
14
),
fontSize:
11
,
fontWeight:
FontWeight
.
w600
,
),
),
),
items:
InkResponse
(
provider
.
unloadingScope
onTap:
()
{
.
map
(
provider
.
imagePicked
=
0
;
(
e
)
=>
DropdownMenuItem
<
String
>(
provider
.
imagePath
=
null
;
value:
e
!,
provider
.
imageFilePath
=
null
;
child:
Text
(
},
e
,
child:
SvgPicture
.
asset
(
style:
const
TextStyle
(
"assets/svg/ic_close.svg"
,
fontSize:
14
,
width:
15
,
height:
15
,
),
),
],
),
),
],
TextWidget
(
context
,
"Unloading Scope"
),
//dd
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
String
>(
hint:
Text
(
"Select Unloading Scope"
,
style:
const
TextStyle
(
fontSize:
14
),
),
items:
provider
.
unloadingScope
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
child:
Text
(
e
,
style:
const
TextStyle
(
fontSize:
14
,
),
),
),
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedUnloadingScope
,
value:
provider
.
selectedUnloadingScope
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
unloadingScope
.
isNotEmpty
)
{
if
(
provider
.
u
nloadingScope
.
isNotEmpty
)
{
provider
.
selectedU
nloadingScope
=
value
;
provider
.
selectedUnloadingScope
=
value
;
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
TextWidget
(
context
,
"Freight Scope"
),
TextWidget
(
context
,
"Freight Scope"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>
(
child:
DropdownButton2
<
String
>
(
hint:
Text
(
hint:
Text
(
"Select Freight Scope"
,
"Select Freight Scope"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
freightScope
provider
.
freightScope
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
value:
e
!,
child:
Text
(
child:
Text
(
e
,
e
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedFreightScope
,
value:
provider
.
selectedFreightScope
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
freightScope
.
isNotEmpty
)
{
if
(
provider
.
freightScope
.
isNotEmpty
)
{
provider
.
selectedFreightScope
=
value
;
provider
.
selectedFreightScope
=
value
;
}
}
},
},
buttonStyleData:
ButtonStyleData
(
buttonStyleData:
ButtonStyleData
(
height:
50
,
height:
50
,
width:
160
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
left:
14
,
left:
14
,
right:
14
,
right:
14
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
),
),
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
),
iconS
ize:
12
,
iconS
tyleData:
IconStyleData
(
icon
EnabledColor:
Color
(
0xFF2D2D2D
),
icon
:
SvgPicture
.
asset
(
iconDisabledColor:
Colors
.
grey
,
"assets/svg/arrow_dropdown.svg"
,
)
,
height:
25
,
dropdownStyleData:
DropdownStyleData
(
width:
20
,
maxHeight:
200
,
)
,
decoration:
BoxDecoration
(
iconSize:
12
,
borderRadius:
BorderRadius
.
circular
(
14
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
color:
App
Colors
.
text_field_color
,
i
co
nDisabledCo
lor:
Colors
.
grey
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
MaterialStateProperty
.
all
<
double
>(
decoration:
BoxDecoration
(
6
,
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
he
ight:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
r
ight:
14
)
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
TextWidget
(
context
,
"Erection Scope"
),
TextWidget
(
context
,
"Erection Scope"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>
(
child:
DropdownButton2
<
String
>
(
hint:
Text
(
hint:
Text
(
"Select Erection Scope"
,
"Select Erection Scope"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
erectionScope
provider
.
erectionScope
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
value:
e
!,
child:
Text
(
child:
Text
(
e
,
e
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedErectionScope
,
value:
provider
.
selectedErectionScope
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
erectionScope
.
isNotEmpty
)
{
if
(
provider
.
e
rectionScope
.
isNotEmpty
)
{
provider
.
selectedE
rectionScope
=
value
;
provider
.
selectedErectionScope
=
value
;
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
TextWidget
(
context
,
"TPC Applicable"
),
TextWidget
(
context
,
"TPC Applicable"
),
//dd
//dd
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child
:
Row
(
child
ren:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>
(
child:
DropdownButton2
<
String
>
(
hint:
Text
(
hint:
Text
(
"TPC Applicable"
,
"TPC Applicable"
,
style:
const
TextStyle
(
fontSize:
14
)
,
style:
const
TextStyle
(
fontSize:
14
),
),
),
items:
items:
provider
.
tpcApplicable
provider
.
tpcApplicable
.
map
(
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!,
value:
e
!,
child:
Text
(
child:
Text
(
e
,
e
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
)
,
),
),
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedTpcStatus
,
value:
provider
.
selectedTpcStatus
,
onChanged:
(
String
?
value
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
tpcApplicable
.
isNotEmpty
)
{
if
(
provider
.
tpcApplicable
.
isNotEmpty
)
{
provider
.
selectedTpcStatus
=
value
;
provider
.
selectedTpcStatus
=
value
;
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
if
(
provider
.
selectedTpcStatus
==
"Yes"
)
...[
if
(
provider
.
selectedTpcStatus
==
"Yes"
)
...[
TextWidget
(
context
,
"TPC Agent"
),
TextWidget
(
context
,
"TPC Agent"
),
//dd
//dd
Container
(
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
ListTile
(
child:
ListTile
(
title:
TextFormField
(
title:
TextFormField
(
focusNode:
focusNodetpc
,
focusNode:
focusNodetpc
,
onTapUpOutside:
(
event
)
{
onTapUpOutside:
(
event
)
{
focusNodetpc
.
unfocus
();
focusNodetpc
.
unfocus
();
},
},
controller:
provider
.
dropDownTpcSearchController
,
controller:
provider
.
dropDownTpcSearchController
,
onChanged:
(
value
)
async
{
onChanged:
(
value
)
async
{
Future
.
delayed
(
Future
.
delayed
(
Duration
(
milliseconds:
100
),
Duration
(
milliseconds:
100
),
()
async
{
()
async
{
await
provider
.
ordersAddOrderTPCAgentFunction
(
await
provider
.
ordersAddOrderTPCAgentFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
value
,
value
,
);
);
},
},
);
);
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
enabledBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
isDense:
true
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
0
,
horizontal:
0
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Select TPC Agent'
,
hintText:
'Select TPC Agent'
,
hintStyle:
const
TextStyle
(
fontSize:
14
),
hintStyle:
const
TextStyle
(
fontSize:
14
),
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
trailing:
InkResponse
(
trailing:
InkResponse
(
onTap:
()
{
onTap:
()
{
if
(
focusNodetpc
.
hasFocus
)
{
if
(
focusNodetpc
.
hasFocus
)
{
focusNodetpc
.
unfocus
();
focusNodetpc
.
unfocus
();
}
else
{
}
else
{
FocusScope
.
of
(
FocusScope
.
of
(
context
,
context
,
).
requestFocus
(
focusNodetpc
);
).
requestFocus
(
focusNodetpc
);
}
}
},
},
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
height:
25
,
width:
20
,
width:
20
,
),
),
),
),
),
),
),
),
if
(
provider
.
tpcAgent
.
isNotEmpty
&&
if
(
provider
.
tpcAgent
.
isNotEmpty
&&
focusNodetpc
.
hasFocus
)
...[
focusNodetpc
.
hasFocus
)
...[
Card
(
Card
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
height:
150
,
height:
150
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Scrollbar
(
child:
Scrollbar
(
thickness:
2.5
,
thickness:
2.5
,
radius:
Radius
.
circular
(
6
),
radius:
Radius
.
circular
(
6
),
thumbVisibility:
true
,
thumbVisibility:
true
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
provider
.
tpcAgent
.
length
,
itemCount:
provider
.
tpcAgent
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
if
(
provider
.
tpcAgent
.
isNotEmpty
)
{
if
(
provider
.
tpcAgent
.
isNotEmpty
)
{
provider
.
selectedTpcAgent
=
provider
.
selectedTpcAgent
=
provider
.
tpcAgent
[
index
];
provider
.
tpcAgent
[
index
];
print
(
print
(
"Selected Complaint Type:
${provider.tpcAgent[index].text}
, ID:
${provider.tpcAgent[index].id}
"
,
"Selected Complaint Type:
${provider.tpcAgent[index].text}
, ID:
${provider.tpcAgent[index].id}
"
,
);
);
provider
.
selectedTpcAgentID
=
provider
.
selectedTpcAgentID
=
provider
.
tpcAgent
[
index
].
id
!;
provider
.
tpcAgent
[
index
].
id
!;
provider
.
selectedTpcAgentValue
=
provider
.
selectedTpcAgentValue
=
provider
.
tpcAgent
[
index
].
text
!;
provider
.
tpcAgent
[
index
].
text
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
selectedTpcAgentID
provider
.
selectedTpcAgentID
.
toString
(),
.
toString
(),
);
);
provider
.
dropDownTpcSearchController
.
text
=
provider
.
dropDownTpcSearchController
.
text
=
provider
.
tpcAgent
[
index
].
text
!;
provider
.
tpcAgent
[
index
].
text
!;
}
}
// provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
// provider.ordersAddPaymentSelectOrderAPIFunction(context, provider.selectedAccountID);
// provider.tpcAgent = [];
// provider.tpcAgent = [];
},
},
child:
SizedBox
(
child:
SizedBox
(
height:
45
,
height:
45
,
child:
Align
(
child:
Align
(
alignment:
Alignment
.
centerLeft
,
alignment:
Alignment
.
centerLeft
,
child:
Text
(
child:
Text
(
provider
.
tpcAgent
[
index
].
text
!,
provider
.
tpcAgent
[
index
].
text
!,
),
),
),
),
),
)
,
)
;
);
},
}
,
)
,
),
),
),
),
),
),
],
textControllerWidget
(
context
,
provider
.
tpcAmountController
,
"TPC Amount"
,
"Enter TPC Amount"
,
provider
.
onChangeTpcAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
6
],
focusNodes
[
7
],
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
tpcAmountError
),
],
],
textControllerWidget
(
///Addorderbutton
context
,
OrderForm
(),
provider
.
tpcAmountController
,
//dd
"TPC Amount"
,
"Enter TPC Amount"
,
provider
.
onChangeTpcAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
6
],
focusNodes
[
7
],
TextInputAction
.
next
,
),
errorWidget
(
context
,
provider
.
tpcAmountError
),
],
],
),
///Addorderbutton
OrderForm
(),
//dd
],
),
),
),
),
),
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
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":"2","qty":"1","price":"1000","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"1000"}]
provider
.
getCurrentLocation
();
provider
.
ordersAddOrderAPISubmitFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmployeeID
,
provider
.
selectedAccountID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
,
provider
.
selectedTpcStatus
,
provider
.
selectedTpcStatus
,
provider
.
selectedBillingStateID
,
provider
.
selectedBillingDistrictId
,
provider
.
selectedBillingSubLocID
,
provider
.
selectedTpcAgentID
,
order_prod_data
[
'orders'
],
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClicked
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
?
null
valueColor:
AlwaysStoppedAnimation
<
Color
>(
:
()
{
AppColors
.
white
,
provider
.
submitClicked
=
true
;
),
var
order_prod_data
=
provider
.
getFormData
();
)
print
(
order_prod_data
);
:
Text
(
print
(
order_prod_data
[
'orders'
]);
"Submit"
,
style:
TextStyle
(
///[{"product_id":"1","qty":"1","price":"500","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"500"},
fontSize:
15
,
///{"product_id":"2","qty":"1","price":"1000","cgst_p":"9","sgst_p":"9","igst_p":"0","total_price":"1000"}]
fontFamily:
"JakartaMedium"
,
provider
.
getCurrentLocation
();
color:
Colors
.
white
,
provider
.
ordersAddOrderAPISubmitFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmployeeID
,
provider
.
selectedAccountID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
,
provider
.
selectedTpcStatus
,
provider
.
selectedTpcStatus
,
provider
.
selectedBillingStateID
,
provider
.
selectedBillingDistrictId
,
provider
.
selectedBillingSubLocID
,
provider
.
selectedTpcAgentID
,
order_prod_data
[
'orders'
],
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
),
...
...
lib/screens/order/addPayment.dart
View file @
ecd8fcd1
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -68,644 +69,648 @@ class _AddpaymentScreenState extends State<AddpaymentScreen> {
...
@@ -68,644 +69,648 @@ class _AddpaymentScreenState extends State<AddpaymentScreen> {
return
Consumer
<
Addpaymentprovider
>(
return
Consumer
<
Addpaymentprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
white
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar2
(
child:
Scaffold
(
context
,
resizeToAvoidBottomInset:
true
,
"
${widget.pageTitleName}
"
,
backgroundColor:
AppColors
.
white
,
provider
.
resetForm
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"
${widget.pageTitleName}
"
,
body:
Container
(
provider
.
resetForm
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
SizedBox
(
width:
0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
SingleChildScrollView
(
body:
Container
(
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
TextWidget
(
context
,
"Account"
),
borderRadius:
BorderRadius
.
circular
(
20
),
Container
(
),
alignment:
Alignment
.
center
,
child:
SingleChildScrollView
(
decoration:
BoxDecoration
(
child:
Column
(
color:
AppColors
.
text_field_color
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
borderRadius:
BorderRadius
.
circular
(
14
),
children:
[
),
TextWidget
(
context
,
"Account"
),
child:
ListTile
(
Container
(
title:
TextFormField
(
alignment:
Alignment
.
center
,
focusNode:
focusNode
,
decoration:
BoxDecoration
(
onTapUpOutside:
(
event
)
{
color:
AppColors
.
text_field_color
,
focusNode
.
unfocus
();
borderRadius:
BorderRadius
.
circular
(
14
),
},
),
controller:
provider
.
dropDownSearchController
,
child:
ListTile
(
onChanged:
(
value
)
async
{
title:
TextFormField
(
Future
.
delayed
(
focusNode:
focusNode
,
Duration
(
milliseconds:
100
),
onTapUpOutside:
(
event
)
{
()
async
{
focusNode
.
unfocus
();
await
provider
},
.
ordersAddPaymentSelectAccountAPIFunction
(
controller:
provider
.
dropDownSearchController
,
context
,
onChanged:
(
value
)
async
{
widget
.
mode
,
Future
.
delayed
(
provider
.
selectedAccountID
,
Duration
(
milliseconds:
100
),
value
,
()
async
{
);
await
provider
},
.
ordersAddPaymentSelectAccountAPIFunction
(
);
context
,
},
widget
.
mode
,
decoration:
InputDecoration
(
provider
.
selectedAccountID
,
enabledBorder:
InputBorder
.
none
,
value
,
focusedBorder:
InputBorder
.
none
,
);
isDense:
true
,
},
contentPadding:
const
EdgeInsets
.
symmetric
(
);
horizontal:
0
,
},
vertical:
8
,
decoration:
InputDecoration
(
),
enabledBorder:
InputBorder
.
none
,
hintText:
'Select Account Type'
,
focusedBorder:
InputBorder
.
none
,
hintStyle:
const
TextStyle
(
fontSize:
14
),
isDense:
true
,
border:
OutlineInputBorder
(
contentPadding:
const
EdgeInsets
.
symmetric
(
borderRadius:
BorderRadius
.
circular
(
8
),
horizontal:
0
,
vertical:
8
,
),
hintText:
'Select Account Type'
,
hintStyle:
const
TextStyle
(
fontSize:
14
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
trailing:
InkResponse
(
trailing:
InkResponse
(
onTap:
()
{
onTap:
()
{
if
(
focusNode
.
hasFocus
)
{
if
(
focusNode
.
hasFocus
)
{
focusNode
.
unfocus
();
focusNode
.
unfocus
();
}
else
{
}
else
{
FocusScope
.
of
(
context
).
requestFocus
(
focusNode
);
FocusScope
.
of
(
context
).
requestFocus
(
focusNode
);
}
}
},
},
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
height:
25
,
width:
20
,
width:
20
,
),
),
),
),
),
),
),
),
if
(
provider
.
accountList
.
isNotEmpty
&&
if
(
provider
.
accountList
.
isNotEmpty
&&
focusNode
.
hasFocus
)
...[
focusNode
.
hasFocus
)
...[
Card
(
Card
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
),
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
height:
widget
.
mode
==
"self"
?
50
:
150
,
height:
widget
.
mode
==
"self"
?
50
:
150
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Scrollbar
(
child:
Scrollbar
(
thickness:
2.5
,
thickness:
2.5
,
radius:
Radius
.
circular
(
6
),
radius:
Radius
.
circular
(
6
),
thumbVisibility:
true
,
thumbVisibility:
true
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
provider
.
accountList
.
length
,
itemCount:
provider
.
accountList
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
if
(
provider
.
accountList
.
isNotEmpty
)
{
if
(
provider
.
accountList
.
isNotEmpty
)
{
provider
.
selectedAccountList
=
provider
.
selectedAccountList
=
provider
.
accountList
[
index
];
provider
.
accountList
[
index
];
print
(
print
(
"Selected Complaint Type:
${provider.accountList[index].text}
, ID:
${provider.accountList[index].id}
"
,
"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
.
ordersAddPaymentSelectOrderAPIFunction
(
context
,
provider
.
selectedAccountID
,
);
);
provider
.
accountList
=
[];
provider
.
selectedAccountID
=
},
provider
.
accountList
[
index
].
id
!;
child:
SizedBox
(
provider
.
selectedAccountName
=
height:
45
,
provider
.
accountList
[
index
].
text
!;
child:
Align
(
print
(
alignment:
Alignment
.
centerLeft
,
"hfjkshfg"
+
child:
Text
(
provider
.
selectedAccountID
provider
.
accountList
[
index
].
text
!,
.
toString
(),
);
provider
.
dropDownSearchController
.
text
=
provider
.
accountList
[
index
].
text
!;
}
provider
.
ordersAddPaymentSelectOrderAPIFunction
(
context
,
provider
.
selectedAccountID
,
);
provider
.
accountList
=
[];
},
child:
SizedBox
(
height:
45
,
child:
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
provider
.
accountList
[
index
].
text
!,
),
),
),
),
),
)
,
)
;
);
},
}
,
)
,
),
),
),
),
),
),
),
],
],
///enwewe
///enwewe
errorWidget
(
context
,
provider
.
selectAccountError
),
errorWidget
(
context
,
provider
.
selectAccountError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amountController
,
provider
.
amountController
,
"Amount"
,
"Amount"
,
"Enter Amount"
,
"Enter Amount"
,
provider
.
onChangeAmount
,
provider
.
onChangeAmount
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
0
],
focusNodes
[
0
],
null
,
null
,
TextInputAction
.
next
TextInputAction
.
next
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
///Addorderbutton
///Addorderbutton
if
(
provider
.
selectedAccountID
!=
null
)
...[
if
(
provider
.
selectedAccountID
!=
null
)
...[
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
// if (provider.selectedOrderIds.length < provider.orderList.length) {
// if (provider.selectedOrderIds.length < provider.orderList.length) {
provider
.
addNewRow
();
provider
.
addNewRow
();
// } else {
// } else {
// ScaffoldMessenger.of(context).showSnackBar(
// ScaffoldMessenger.of(context).showSnackBar(
// SnackBar(
// SnackBar(
// content: Text('No more unique order IDs or statuses available'),
// content: Text('No more unique order IDs or statuses available'),
// ),
// ),
// );
// );
// }
// }
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Order"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Order"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
),
),
),
),
if
(
provider
.
orderAmountControllers
.
length
>
0
)
...[
if
(
provider
.
orderAmountControllers
.
length
>
0
)
...[
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
itemCount:
provider
.
orderAmountControllers
.
length
,
provider
.
orderAmountControllers
.
length
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Row
(
return
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
flex:
3
,
flex:
3
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
TextWidget
(
context
,
"Order"
),
TextWidget
(
context
,
"Order"
),
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButton2
<
child:
DropdownButton2
<
OrderList
OrderList
>(
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
'Select Account Type'
,
'Select Account Type'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow
:
items
:
TextOverflow
provider
.
orderList
.
ellipsis
,
.
map
(
),
(
items:
ord
,
provider
.
orderList
)
=>
DropdownMenuItem
<
.
map
(
OrderList
(
>
(
ord
,
value:
ord
,
)
=>
DropdownMenuItem
<
child:
Text
(
OrderList
"(Order Number:
${ord.orderNumber}
) + (Order Amount:
${ord.totalAmount}
) + (Balance Amount:
${ord.balanceAmount}
) + (Date Time:
${ord.createdDatetime}
)"
??
>(
''
,
value:
ord
,
style:
const
TextStyle
(
child:
Text
(
fontSize:
"(Order Number:
${ord.orderNumber}
) + (Order Amount:
${ord.totalAmount}
) + (Balance Amount:
${ord.balanceAmount}
) + (Date Time:
${ord.createdDatetime}
)"
??
14
,
''
,
)
,
style:
const
TextStyle
(
overflow:
fontSize:
TextOverflow
14
,
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
)
)
.
toList
(),
.
toList
(),
// value: provider.selectedOrderLists,
// value: provider.selectedOrderLists,
value:
provider
.
selectedOrderIds
[
index
]
!=
null
?
value:
provider
.
selectedOrderIds
[
index
]
!=
null
?
provider
provider
.
orderList
.
orderList
.
firstWhere
(
.
firstWhere
(
(
product
)
=>
(
product
)
=>
product
product
.
orderId
==
.
orderId
==
provider
.
selectedOrderIds
[
index
],
):
null
,
onChanged:
(
OrderList
?
value
,
)
{
if
(
value
!=
null
)
{
if
(
provider
.
orderList
.
isNotEmpty
)
{
provider
.
selectedOrderLists
=
value
;
print
(
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
);
provider
.
updateSelectedOrderId
(
index
,
provider
.
selectedOrderLists
,
);
// provider.selectedOrderIds = value!.orderId!;
// provider.selectedOrderNumbers = value!.orderNumber!;
print
(
"hfjkshfg"
+
provider
provider
.
selectedOrderIds
.
selectedOrderIds
[
index
],
.
toString
(),
):
null
,
);
onChanged:
(
OrderList
?
value
,
)
{
if
(
value
!=
null
)
{
if
(
provider
.
orderList
.
isNotEmpty
)
{
provider
.
selectedOrderLists
=
value
;
print
(
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
);
provider
.
updateSelectedOrderId
(
index
,
provider
.
selectedOrderLists
,
);
// provider.selectedOrderIds = value!.orderId!;
// provider.selectedOrderNumbers = value!.orderNumber!;
print
(
"hfjkshfg"
+
provider
.
selectedOrderIds
.
toString
(),
);
}
}
}
}
}
,
},
buttonStyleData:
buttonStyleData:
ddtheme
ddtheme
.
buttonStyleData
,
.
butt
onStyleData
,
ic
onStyleData
:
iconStyleData:
ddtheme
ddtheme
.
iconStyleData
,
.
icon
StyleData
,
menuItem
StyleData
:
menuItemStyleData:
ddtheme
ddtheme
.
menuItemStyleData
,
.
menuItem
StyleData
,
dropdown
StyleData
:
dropdownStyleData:
ddtheme
ddtheme
.
dropdownStyleData
,
.
dropdownStyleData
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
)
,
]
,
]
,
)
,
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
textControllerWidget
(
child:
textControllerWidget
(
context
,
context
,
provider
provider
.
orderAmountControllers
[
index
],
.
orderAmountControllers
[
index
],
"Order Amount"
,
"Order Amount"
,
"Enter Order Amount"
,
"Enter Order Amount"
,
(
p0
)
{
(
p0
)
{
provider
.
updateAdjustedAmount
();
provider
.
updateAdjustedAmount
();
},
},
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
FilteringTextInputFormatter
.
digitsOnly
,
.
digitsOnly
,
null
,
null
,
TextInputAction
.
next
null
,
null
,
TextInputAction
.
next
),
),
),
),
// SizedBox(width: 10
),
//
SizedBox(width: 10),
//
//
// IconButton(
//
IconButton(
//
icon: Icon(Icons.delete),
//
icon: Icon(Icons.delete),
//
onPressed: provider.orderAmountControllers.length > 1
//
onPressed: provider.orderAmountControllers.length > 1
//
? () => provider.removeRow(index)
//
? () => provider.removeRow(index)
//
: null, // Prevent removing the last row
// : null, // Prevent removing the last row
// ),
// )
,
]
,
],
);
);
},
}
,
)
,
),
),
),
],
],
),
),
],
],
],
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
orderAdjustedAmountController
,
provider
.
orderAdjustedAmountController
,
"Order Adjusted Amount"
,
"Order Adjusted Amount"
,
"Enter Order Adjusted Amount"
,
"Enter Order Adjusted Amount"
,
provider
.
onChangeorderAdjustedAmount
,
provider
.
onChangeorderAdjustedAmount
,
TextInputType
.
number
,
TextInputType
.
number
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
1
],
focusNodes
[
1
],
null
,
null
,
TextInputAction
.
done
TextInputAction
.
done
),
),
errorWidget
(
context
,
provider
.
orderAdjustedAmountError
),
errorWidget
(
context
,
provider
.
orderAdjustedAmountError
),
TextWidget
(
context
,
"Description"
),
TextWidget
(
context
,
"Description"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>(
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'Select Advance Payment'
,
'Select Advance Payment'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
],
],
),
),
items:
items:
provider
.
description
provider
.
description
.
map
(
.
map
(
(
pm
)
=>
DropdownMenuItem
<
String
>(
(
pm
)
=>
DropdownMenuItem
<
String
>(
value:
pm
,
value:
pm
,
child:
Text
(
child:
Text
(
pm
,
pm
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedDescription
,
value:
provider
.
selectedDescription
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
provider
.
selectedDescription
=
value
;
provider
.
selectedDescription
=
value
;
print
(
print
(
"statusId:
${provider.selectedDescription}
"
,
"statusId:
${provider.selectedDescription}
"
,
);
);
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
descriptionError
),
errorWidget
(
context
,
provider
.
descriptionError
),
TextWidget
(
context
,
"Payment Received Date"
),
TextWidget
(
context
,
"Payment Received Date"
),
GestureDetector
(
GestureDetector
(
onTap:
()
{
onTap:
()
{
provider
.
showDatePickerDialog
(
context
);
provider
.
showDatePickerDialog
(
context
);
},
},
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
height:
50
,
height:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
),
child:
TextFormField
(
child:
Padding
(
controller:
padding:
const
EdgeInsets
.
fromLTRB
(
provider
.
paymentReceivedDateController
,
10.0
,
keyboardType:
TextInputType
.
text
,
0.0
,
enabled:
false
,
10
,
maxLines:
1
,
0
,
readOnly:
true
,
),
onChanged:
(
value
)
{},
child:
TextFormField
(
decoration:
InputDecoration
(
controller:
hintText:
"Enter Date"
,
provider
.
paymentReceivedDateController
,
hintStyle:
TextStyle
(
keyboardType:
TextInputType
.
text
,
fontWeight:
FontWeight
.
w400
,
enabled:
false
,
color:
Color
(
0xFFB4BEC0
),
maxLines:
1
,
fontSize:
14
,
readOnly:
true
,
),
onChanged:
(
value
)
{},
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
dateError
),
errorWidget
(
context
,
provider
.
dateError
),
TextWidget
(
context
,
"Select Payment Mode"
),
TextWidget
(
context
,
"Select Payment Mode"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>(
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'Select Payment Mode'
,
'Select Payment Mode'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
],
],
),
),
items:
items:
provider
.
paymentMode
provider
.
paymentMode
.
map
(
.
map
(
(
pm
)
=>
DropdownMenuItem
<
String
>(
(
pm
)
=>
DropdownMenuItem
<
String
>(
value:
pm
,
value:
pm
,
child:
Text
(
child:
Text
(
pm
,
pm
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectedPaymentMode
,
value:
provider
.
selectedPaymentMode
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
if
(
valu
e
!
=
null
)
{
provider
.
selectedPaymentMod
e
=
value
;
provider
.
selectedPaymentMode
=
value
;
print
(
print
(
"statusId:
${provider.selectedPaymentMode}
"
,
"statusId:
${provider.selectedPaymentMode}
"
,
);
);
}
}
}
,
}
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
icon
StyleData:
ddtheme
.
icon
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
menuItem
StyleData:
ddtheme
.
menuItem
StyleData
,
dropdown
StyleData:
ddtheme
.
dropdown
StyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
paymentModeError
),
errorWidget
(
context
,
provider
.
paymentModeError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
paymentRefController
,
provider
.
paymentRefController
,
"Payment Reference No"
,
"Payment Reference No"
,
"Enter Payment Reference No. / Cheque No. / UTR No."
,
"Enter Payment Reference No. / Cheque No. / UTR No."
,
provider
.
onChangepaymentRef
,
provider
.
onChangepaymentRef
,
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
2
],
focusNodes
[
2
],
null
,
null
,
TextInputAction
.
done
TextInputAction
.
done
),
),
errorWidget
(
context
,
provider
.
paymentRefError
),
errorWidget
(
context
,
provider
.
paymentRefError
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Payment Reference"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
),
),
child:
Center
(
),
child:
Text
(
),
"Payment Reference"
,
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaMedium"
,
fontSize:
11
,
color:
AppColors
.
app_blue
,
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
),
),
]
,
)
,
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
),
],
],
],
]
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
f
loatingActionButtonLocation
:
F
loatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
bottomNavigationBar:
InkResponse
(
InkResponse
(
onTap:
provider
.
submitClicked
?
null
:()
{
onTap:
provider
.
submitClicked
?
null
:()
{
provider
.
submitClicked
=
true
;
provider
.
s
ubmitClicked
=
true
;
provider
.
s
electedOrders
=
provider
.
getFormData
()
;
provider
.
selectedOrders
=
provider
.
getFormData
();
provider
.
ordersAddPaymentAPISubmitFunction
(
provider
.
ordersAddPaymentAPISubmitFunction
(
context
,
cont
ext
,
provider
.
selectedAc
co
u
nt
ID
,
provider
.
selected
AccountID
,
provider
.
selected
Description
,
provider
.
selected
Description
,
provider
.
selected
Orders
,
provider
.
selected
Orders
,
provider
.
selected
PaymentMode
,
provider
.
selectedPaymentMode
,
);
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
)
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
1
5
),
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
Colors
.
white
),
valueColor:
AlwaysStoppedAnimation
(
Colors
.
white
),
):
Text
(
):
Text
(
"Submit"
,
"Submit"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
font
Size:
15
,
font
Family:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
color:
Colors
.
white
,
)
,
),
),
),
),
),
),
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment