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
d24e453e
Commit
d24e453e
authored
Jun 19, 2025
by
Sai Srinivas
Browse files
19-06-2025 By Sai Srinivas
Finance Module Test cases & Safe Area
parent
4807bee4
Changes
52
Hide whitespace changes
Inline
Side-by-side
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
d24e453e
...
@@ -28,16 +28,25 @@ class Allpaymentrequesitionlistsbymodes extends StatefulWidget {
...
@@ -28,16 +28,25 @@ class Allpaymentrequesitionlistsbymodes extends StatefulWidget {
class
_AllpaymentrequesitionlistsbymodesState
class
_AllpaymentrequesitionlistsbymodesState
extends
State
<
Allpaymentrequesitionlistsbymodes
>
{
extends
State
<
Allpaymentrequesitionlistsbymodes
>
{
late
Commondaterangefilter
cf
;
@override
@override
void
initState
()
{
void
initState
()
{
// TODO: implement initState
// TODO: implement initState
super
.
initState
();
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
cf
=
Commondaterangefilter
();
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
context
,
listen:
false
,
listen:
false
,
);
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
''
,
''
);
final
now
=
DateTime
.
now
();
final
range
=
DateTimeRange
(
start:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
end:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
);
final
dateRange
=
cf
.
getFormattedDateRange
(
range
);
// print(dateRange);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
dateRange
[
0
],
dateRange
[
1
]);
});
});
}
}
...
@@ -103,262 +112,261 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -103,262 +112,261 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
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
?
Si
ngleChildScrollView
(
:
requestLists
.
isNotEmpty
?
Si
zedBox
(
child:
Column
(
child:
Scrollbar
(
children:
[
thumbVisibility:
false
,
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
Never
ScrollableScrollPhysics
(),
physics:
Always
ScrollableScrollPhysics
(),
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
(
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:
BorderRadius
.
circular
(
8
),
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:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
requestLists
[
index
]
requestLists
[
index
]
.
accountName
!,
.
accountName
!,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
AppColors
.
semi_black
,
),
),
),
),
Text
(
Text
(
"₹"
"₹"
"
${requestLists[index].amount}
"
,
"
${requestLists[index].amount}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
fontSize:
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:
BorderRadius
.
circular
(
8
),
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
color:
Color
(
0xFFE3FFE0
),
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
requestLists
[
index
].
status
!,
requestLists
[
index
].
status
!,
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
(
Divider
(
thickness:
0.5
,
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
color:
Color
(
0xFFD7D7D7
),
),
),
...
List
.
generate
(
4
,
(
j
)
{
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
final
headings
=
[
"Requesting Propose"
,
"Requesting Propose"
,
"Attachment"
,
"Attachment"
,
"Requested Date"
,
"Requested Date"
,
"Note"
,
"Note"
,
];
];
final
subHeadings
=
[
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
requestLists
[
index
].
requestingPurpose
,
"View"
,
"View"
,
// requestLists[index].attachmentDirFilePath
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
requestLists
[
index
].
description
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
vertical:
5
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
headings
[
j
],
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
onTap:
j
!=
1
j
!=
1
?
null
?
null
:
()
{
:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
(
context
,
context
,
)
=>
Fileviewer
(
)
=>
Fileviewer
(
fileName:
fileName:
requestLists
[
index
]
requestLists
[
index
]
.
attachmentViewFileName
!,
.
attachmentViewFileName
!,
fileUrl:
fileUrl:
requestLists
[
index
]
requestLists
[
index
]
.
attachmentDirFilePath
!,
.
attachmentDirFilePath
!,
),
),
),
),
);
);
},
},
child:
Text
(
child:
Text
(
subHeadings
[
j
]!,
subHeadings
[
j
]!,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
color:
j
==
1
j
==
1
?
AppColors
?
AppColors
.
app_blue
.
app_blue
:
Color
(
:
Color
(
0xFF818181
,
0xFF818181
,
),
),
decoration:
decoration:
j
==
1
j
==
1
?
TextDecoration
?
TextDecoration
.
underline
.
underline
:
TextDecoration
:
TextDecoration
.
none
,
.
none
,
decorationColor:
decorationColor:
j
==
1
j
==
1
?
AppColors
?
AppColors
.
app_blue
.
app_blue
:
AppColors
.
white
,
:
AppColors
.
white
,
),
),
),
),
),
),
),
),
],
],
),
),
);
);
}),
}),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
(
context
)
=>
Paymentrequestionlistdetails
(
Paymentrequestionlistdetails
(
pageName:
pageName:
widget
widget
.
pageTitleName
,
.
pageTitleName
,
mode:
widget
.
mode
,
mode:
widget
.
mode
,
paymentRequestId:
paymentRequestId:
requestLists
[
index
]
requestLists
[
index
]
.
id
,
.
id
,
),
),
),
),
);
);
},
},
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
vertical:
5
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
center
,
CrossAxisAlignment
.
center
,
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
start
,
MainAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
"View Details"
,
"View Details"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
),
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
"assets/svg/next_button.svg"
,
),
),
],
],
),
),
),
),
),
),
],
],
),
),
);
);
},
},
),
),
],
),
),
):
Emptywidget
(
context
),)
):
Emptywidget
(
context
),
),
),
);
);
},
},
...
...
lib/screens/finance/FileViewer.dart
View file @
d24e453e
...
@@ -80,7 +80,7 @@ class _FileviewerState extends State<Fileviewer> {
...
@@ -80,7 +80,7 @@ class _FileviewerState extends State<Fileviewer> {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"File Viewer"
),
appBar:
appbar
(
context
,
"File Viewer"
),
body:
fileWidget
(
context
),
body:
SafeArea
(
child:
fileWidget
(
context
)
)
,
);
);
}
}
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
d24e453e
...
@@ -64,198 +64,181 @@ class _PaymentrequestionlistdetailsState
...
@@ -64,198 +64,181 @@ class _PaymentrequestionlistdetailsState
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Requesitionlidtdetailsprovider
>(
return
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
var
payment_det
=
provider
.
paymentsDetails
;
var
req_det
=
provider
.
requestsDetails
;
var
req_det
=
provider
.
requestsDetails
;
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
provider
.
subHeadings
=
[
req_det
.
accountName
??
"-"
,
req_det
.
proposedAccount
??
"-"
,
req_det
.
branch
??
"-"
,
req_det
.
requestingPurpose
??
"-"
,
req_det
.
requestMode
??
"-"
,
req_det
.
createdEmployee
??
"-"
,
req_det
.
attachmentViewFileName
??
"-"
,
req_det
.
date
??
"-"
,
req_det
.
description
??
"-"
,
req_det
.
level1ApprovalRemarks
??
"-"
,
req_det
.
level1Employee
??
"-"
,
req_det
.
level2ApprovalRemarks
??
"-"
,
req_det
.
level2Employee
??
"-"
,
req_det
.
createdDatetime
??
"-"
,
req_det
.
updatedDatetime
??
"-"
,
];
});
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
widget
.
pageName
),
appBar:
appbar
(
context
,
widget
.
pageName
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Container
(
child:
SingleChildScrollView
(
decoration:
BoxDecoration
(
child:
Container
(
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
children:
[
child:
Column
(
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
width:
35
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
8.0
),
color:
Color
(
0xFFFFF3CE
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Text
(
Text
(
req_det
.
accountName
==
""
?
"-"
:
req_det
.
accountName
??
"-"
,
req_det
.
accountName
??
"-"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
req_det
.
amount
==
""
?
"-"
:
"₹
${req_det.amount}
"
,
"₹
${req_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
req_det
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
App
Color
s
.
app_blue
,
color:
Color
(
0xFF0D9C00
)
,
),
),
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
req_det
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
],
],
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
req_det
.
attachmentViewFileName
!,
fileUrl:
req_det
.
attachmentDirFilePath
!,
),
),
);
}
else
if
(
provider
.
Headings
[
j
]
==
"Requested Account"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
provider
.
requestsDetails
.
accountId
,
),
),
);
}
},
child:
Text
(
child:
Text
(
[
provider
.
Headings
[
j
],
"Attachment"
,
].
contains
(
provider
.
Headings
[
j
])
?
"View"
:
"
${provider.subHeadings[j]}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
Expanded
(
],
child:
InkResponse
(
),
onTap:
()
{
);
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
}),
Navigator
.
push
(
],
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
req_det
.
attachmentViewFileName
??
""
,
fileUrl:
req_det
.
attachmentDirFilePath
??
""
,
),
),
);
}
else
if
(
provider
.
Headings
[
j
]
==
"Requested Account"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
provider
.
requestsDetails
.
accountId
,
),
),
);
}
},
child:
Text
(
[
"Attachment"
,
].
contains
(
provider
.
Headings
[
j
])
?
"View"
:
provider
.
subHeadings
[
j
]==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
],
),
),
),
),
),
),
),
...
...
lib/screens/finance/addPaymentReceiptList.dart
View file @
d24e453e
...
@@ -51,465 +51,467 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -51,465 +51,467 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
body:
Container
(
body:
SafeArea
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Container
(
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
),
child:
SingleChildScrollView
(
),
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
TextWidget
(
context
,
"Account"
),
children:
[
DropdownButtonHideUnderline
(
TextWidget
(
context
,
"Account"
),
child:
Row
(
DropdownButtonHideUnderline
(
children:
[
child:
Row
(
Expanded
(
children:
[
child:
DropdownButton2
<
Accounts
>(
Expanded
(
isExpanded:
true
,
child:
DropdownButton2
<
Accounts
>(
hint:
Text
(
isExpanded:
true
,
'Select Account Type'
,
hint:
Text
(
style:
TextStyle
(
fontSize:
14
),
'Select Account Type'
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
),
),
overflow:
TextOverflow
.
ellipsis
,
items:
),
provider
.
receiptAccounts
items:
.
map
(
provider
.
receiptAccounts
(
accs
)
=>
.
map
(
DropdownMenuItem
<
Accounts
>(
(
accs
)
=>
value:
accs
,
DropdownMenuItem
<
Accounts
>(
child:
Text
(
value:
accs
,
accs
.
name
??
''
,
child:
Text
(
style:
const
TextStyle
(
accs
.
name
??
''
,
fontSize:
14
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectreceiptAccounts
,
value:
provider
.
selectreceiptAccounts
,
onChanged:
(
Accounts
?
value
)
{
onChanged:
(
Accounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
receiptAccounts
.
isNotEmpty
)
{
if
(
provider
.
receiptAccounts
.
isNotEmpty
)
{
provider
.
select
receiptAccounts
=
value
;
provider
.
selectreceiptAccounts
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
)
;
provider
.
receiptAccountId
=
value
.
id
!
;
provider
.
receiptAccount
Id
=
value
.
id
!;
provider
.
receiptAccount
Value
=
value
.
name
!;
provider
.
receiptAccountValue
=
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
receiptAccountId
.
toString
(),
provider
.
receiptAccountId
.
toString
(),
);
);
}
}
}
}
}
,
},
buttonStyleData:
ButtonStyleData
(
buttonStyleData:
ButtonStyleData
(
height:
50
,
height:
5
0
,
width:
16
0
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
left:
14
,
lef
t:
14
,
righ
t:
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
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
MaterialStateProperty
.
all
<
double
>(
decoration:
BoxDecoration
(
6
,
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
he
ight:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
r
ight:
14
)
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectAccountError
),
errorWidget
(
context
,
provider
.
selectAccountError
),
TextWidget
(
context
,
"Payment Account"
),
TextWidget
(
context
,
"Payment Account"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
ReceiptAccounts
>(
child:
DropdownButton2
<
ReceiptAccounts
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
'Select Account Type'
,
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
receiptPaymentAccounts
provider
.
receiptPaymentAccounts
.
map
(
.
map
(
(
accs
)
=>
DropdownMenuItem
<
(
accs
)
=>
DropdownMenuItem
<
ReceiptAccounts
ReceiptAccounts
>(
>(
value:
accs
,
value:
accs
,
child:
Text
(
child:
Text
(
accs
.
name
??
''
,
accs
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectreceiptPaymentAccounts
,
value:
provider
.
selectreceiptPaymentAccounts
,
onChanged:
(
ReceiptAccounts
?
value
)
{
onChanged:
(
ReceiptAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
if
(
provider
.
receiptPaymentAccounts
.
receiptPaymentAccounts
.
isNotEmpty
)
{
.
isNotEmpty
)
{
provider
.
selectreceiptPaymentAccounts
=
provider
.
selectreceiptPaymentAccounts
=
value
;
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
);
provider
.
receiptPaymentAccountsID
=
provider
.
receiptPaymentAccountsID
=
value
.
id
!;
value
.
id
!;
provider
.
receiptPaymentAccountsValue
=
provider
.
receiptPaymentAccountsValue
=
value
.
name
!;
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
receiptPaymentAccountsID
provider
.
receiptPaymentAccountsID
.
toString
(),
.
toString
(),
);
);
}
}
}
}
},
},
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
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
),
decoration:
BoxDecoration
(
iconStyleData:
IconStyleData
(
borderRadius:
BorderRadius
.
circular
(
14
),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
color:
AppColors
.
text_field_color
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
),
),
),
dropdownStyleData:
DropdownStyleData
(
iconStyleData:
IconStyleData
(
maxHeight:
200
,
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
decoration:
BoxDecoration
(
iconSize:
12
,
borderRadius:
BorderRadius
.
circular
(
14
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
color:
AppColors
.
text_field_color
,
iconDisabledColor:
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
,
thumbVisibility:
),
MaterialStateProperty
.
all
<
bool
>(
true
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
),
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
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectPaymentAccountError
),
errorWidget
(
context
,
provider
.
selectPaymentAccountError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amountController
,
provider
.
amountController
,
"Enter Amount"
,
"Enter Amount"
,
provider
.
updateAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
provider
.
updateAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
///payment date toBE
///payment date toBE
TextWidget
(
context
,
"Receipt Date"
),
TextWidget
(
context
,
"Receipt 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
(
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
dateController
,
controller:
provider
.
dateController
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
enabled:
false
,
enabled:
false
,
maxLines:
1
,
maxLines:
1
,
readOnly:
true
,
readOnly:
true
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
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
<
PaymentModes
>(
child:
DropdownButton2
<
PaymentModes
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
'Select Payment mode'
,
'Select Payment mode'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
receiptPaymentModes
provider
.
receiptPaymentModes
.
map
(
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
(
paymenents
)
=>
DropdownMenuItem
<
PaymentModes
PaymentModes
>(
>(
value:
paymenents
,
value:
paymenents
,
child:
Text
(
child:
Text
(
paymenents
.
name
??
''
,
paymenents
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectreceiptPaymentModes
,
value:
provider
.
selectreceipt
PaymentModes
,
onChanged:
(
PaymentModes
?
value
)
{
onChanged:
(
PaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
receiptPaymentModes
.
isNotEmpty
)
{
if
(
provider
.
receiptPaymentModes
.
isNotEmpty
)
{
provider
.
select
receiptPaymentModes
=
value
;
provider
.
selectreceiptPaymentModes
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
)
;
provider
.
receiptPaymentModesID
=
value
.
id
!
;
provider
.
receiptPaymentModes
ID
=
value
.
id
!;
provider
.
receiptPaymentModes
Values
=
provider
.
receiptPaymentModesValues
=
value
.
name
!;
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
receiptPaymentModesID
provider
.
receiptPaymentModesID
.
toString
(),
.
toString
(),
);
);
}
}
}
}
}
,
},
buttonStyleData:
ButtonStyleData
(
buttonStyleData:
ButtonStyleData
(
height:
50
,
height:
5
0
,
width:
16
0
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
left:
14
,
lef
t:
14
,
righ
t:
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
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
MaterialStateProperty
.
all
<
double
>(
decoration:
BoxDecoration
(
6
,
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
he
ight:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
r
ight:
14
)
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
),
),
],
],
),
),
),
errorWidget
(
context
,
provider
.
paymentModeError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...
[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
errorWidget
(
context
,
provider
.
paymentModeError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...
[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
context
,
provider
.
bankAcHolderController
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...
[
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter UPI ID"
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
UPIError
),
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankAcHolder
Controller
,
provider
.
paymentReference
Controller
,
"Enter
Bank Account Holder Name
"
,
"Enter
Payment Reference Number
"
,
provider
.
update
Holder
,
TextInputType
.
text
,
false
,
null
provider
.
update
reference
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
bankHolderError
),
errorWidget
(
context
,
provider
.
paymentreferenceError
),
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...
[
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amount
Controller
,
provider
.
desc
Controller
,
"Enter
UPI ID
"
,
"Enter
Description
"
,
provider
.
update
UPI
,
TextInputType
.
text
,
false
,
null
provider
.
update
Description
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
UPIError
),
errorWidget
(
context
,
provider
.
descriptionError
),
],
InkResponse
(
textControllerWidget
(
onTap:
()
{
context
,
_showAttachmentSheet
(
context
);
provider
.
paymentReferenceController
,
},
"Enter Payment Reference Number"
,
child:
Container
(
provider
.
updatereference
,
TextInputType
.
text
,
false
,
null
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
),
height:
45
,
errorWidget
(
context
,
provider
.
paymentreferenceError
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
textControllerWidget
(
decoration:
BoxDecoration
(
context
,
color:
Color
(
0xFFE6F6FF
),
provider
.
descController
,
borderRadius:
BorderRadius
.
circular
(
12
),
"Enter Description"
,
border:
Border
.
all
(
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
descriptionError
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"File Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"File Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
Padding
(
P
adding
(
p
adding
:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignm
en
t
:
MainAxisAlignment
.
spaceBetween
,
childr
en:
[
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
fontSize:
11
,
font
Size:
11
,
font
Weight:
FontWeight
.
w600
fontWeight:
FontWeight
.
w600
),),
),),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imageP
icked
=
0
;
provider
.
imageP
ath
=
null
;
provider
.
imagePath
=
null
;
provider
.
image
File
Path
=
null
;
provider
.
imageFilePath
=
null
;
},
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
]
,
)
,
)
,
)
)
],
],
],
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/directPaymentRequesitionList.dart
View file @
d24e453e
...
@@ -55,478 +55,480 @@ class _DirectpaymentrequesitionlistState
...
@@ -55,478 +55,480 @@ class _DirectpaymentrequesitionlistState
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
body:
Container
(
body:
SafeArea
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Container
(
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
),
child:
SingleChildScrollView
(
),
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
TextWidget
(
context
,
"Account"
),
children:
[
DropdownButtonHideUnderline
(
TextWidget
(
context
,
"Account"
),
child:
Row
(
DropdownButtonHideUnderline
(
children:
[
child:
Row
(
Expanded
(
children:
[
child:
DropdownButton2
<
DirectAccounts
>(
Expanded
(
isExpanded:
true
,
child:
DropdownButton2
<
DirectAccounts
>(
hint:
Text
(
isExpanded:
true
,
'Select Account Type'
,
hint:
Text
(
style:
TextStyle
(
fontSize:
14
),
'Select Account Type'
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
),
),
overflow:
TextOverflow
.
ellipsis
,
items:
),
provider
.
directAccounts
items:
.
map
(
provider
.
directAccounts
(
accs
)
=>
.
map
(
DropdownMenuItem
<
DirectAccounts
>(
(
accs
)
=>
value:
accs
,
DropdownMenuItem
<
DirectAccounts
>(
child:
Text
(
value:
accs
,
accs
.
name
??
''
,
child:
Text
(
style:
const
TextStyle
(
accs
.
name
??
''
,
fontSize:
14
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectDirectAccounts
,
value:
provider
.
select
DirectAccounts
,
onChanged:
(
DirectAccounts
?
value
)
{
onChanged:
(
DirectAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directAccounts
.
isNotEmpty
)
{
if
(
provider
.
d
irectAccounts
.
isNotEmpty
)
{
provider
.
selectD
irectAccounts
=
value
;
provider
.
selectDirectAccounts
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
)
;
provider
.
directAccountId
=
value
.
id
!
;
provider
.
directAccount
Id
=
value
.
id
!;
provider
.
directAccount
Value
=
value
.
name
!;
provider
.
directAccountValue
=
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
directAccountId
.
toString
(),
provider
.
directAccountId
.
toString
(),
);
);
}
}
}
}
},
},
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
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
context
,
provider
.
selectDirectAccountError
),
errorWidget
(
context
,
provider
.
selectDirectAccountError
),
TextWidget
(
context
,
"Payment Account"
),
TextWidget
(
context
,
"Payment Account"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
DirectPaymentAccounts
>(
child:
DropdownButton2
<
DirectPaymentAccounts
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
'Select Account Type'
,
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
directPaymentAccounts
provider
.
directPaymentAccounts
.
map
(
.
map
(
(
accs
)
=>
DropdownMenuItem
<
(
accs
)
=>
DropdownMenuItem
<
DirectPaymentAccounts
DirectPaymentAccounts
>(
>(
value:
accs
,
value:
accs
,
child:
Text
(
child:
Text
(
accs
.
name
??
''
,
accs
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectDirectPaymentAccounts
,
value:
provider
.
select
DirectPaymentAccounts
,
onChanged:
(
DirectPaymentAccounts
?
value
)
{
onChanged:
(
DirectPaymentAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
if
(
provider
.
directPaymentAccounts
.
directPaymentAccounts
.
isNotEmpty
)
{
.
isNotEmpty
)
{
provider
.
selectDirectPaymentAccounts
=
provider
.
selectDirectPaymentAccounts
=
value
;
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
);
provider
.
directPaymentAccountsID
=
provider
.
directPaymentAccountsID
=
value
.
id
!;
value
.
id
!;
provider
.
directPaymentAccountsValue
=
provider
.
directPaymentAccountsValue
=
value
.
name
!;
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
directPaymentAccountsID
provider
.
directPaymentAccountsID
.
toString
(),
.
toString
(),
);
);
}
}
}
}
},
},
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
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
errorWidget
(
errorWidget
(
context
,
context
,
provider
.
selectDirectPaymentAccountError
,
provider
.
selectDirectPaymentAccountError
,
),
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amountController
,
provider
.
amountController
,
"Enter Amount"
,
"Enter Amount"
,
provider
.
updateAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
provider
.
updateAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
///payment date toBE
///payment date toBE
TextWidget
(
context
,
"Enter Date"
),
TextWidget
(
context
,
"Enter 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:
provider
.
dateController
,
padding:
const
EdgeInsets
.
fromLTRB
(
keyboardType:
TextInputType
.
text
,
10.0
,
enabled:
false
,
0.0
,
maxLines:
1
,
10
,
readOnly:
true
,
0
,
onChanged:
(
value
)
{},
),
decoration:
InputDecoration
(
child:
TextFormField
(
hintText:
"Enter Date"
,
controller:
provider
.
dateController
,
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
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
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
<
DirectPaymentModes
>(
child:
DropdownButton2
<
DirectPaymentModes
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
'Select Payment mode'
,
'Select Payment mode'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
directPaymentModes
provider
.
directPaymentModes
.
map
(
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
(
paymenents
)
=>
DropdownMenuItem
<
DirectPaymentModes
DirectPaymentModes
>(
>(
value:
paymenents
,
value:
paymenents
,
child:
Text
(
child:
Text
(
paymenents
.
name
??
''
,
paymenents
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
,
)
)
.
toList
(),
.
toList
()
,
value:
provider
.
selectDirectPaymentModes
,
value:
provider
.
select
DirectPaymentModes
,
onChanged:
(
DirectPaymentModes
?
value
)
{
onChanged:
(
DirectPaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directPaymentModes
.
isNotEmpty
)
{
if
(
provider
.
d
irectPaymentModes
.
isNotEmpty
)
{
provider
.
selectD
irectPaymentModes
=
value
;
provider
.
selectDirectPaymentModes
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
)
;
provider
.
directPaymentModesID
=
value
.
id
!
;
provider
.
directPaymentModes
ID
=
value
.
id
!;
provider
.
directPaymentModes
Values
=
provider
.
directPaymentModesValues
=
value
.
name
!;
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
directPaymentModesID
provider
.
directPaymentModesID
.
toString
(),
.
toString
(),
);
);
}
}
}
}
},
},
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
),
),
),
),
),
),
),
],
],
),
),
),
errorWidget
(
context
,
provider
.
selectDirectPaymentError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
directPaymentModesValues
))
...[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
errorWidget
(
context
,
provider
.
selectDirectPaymentError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
directPaymentModesValues
))
...[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
context
,
provider
.
bankAcHolderController
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
directPaymentModesValues
==
"UPI"
)
...[
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter UPI ID"
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
UPIError
),
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankAcHolder
Controller
,
provider
.
paymentReference
Controller
,
"Enter
Bank Account Holder Name
"
,
"Enter
Payment Reference Number
"
,
provider
.
update
Holder
,
TextInputType
.
text
,
false
,
null
provider
.
update
Reference
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
bankHolderError
),
errorWidget
(
context
,
provider
.
paymentreferenceerror
),
]
else
if
(
provider
.
directPaymentModesValues
==
"UPI"
)
...[
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
amount
Controller
,
provider
.
desc
Controller
,
"Enter
UPI ID
"
,
"Enter
Description
"
,
provider
.
update
UPI
,
TextInputType
.
text
,
false
,
null
provider
.
update
Description
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
UPIError
),
errorWidget
(
context
,
provider
.
descriptionError
),
],
InkResponse
(
textControllerWidget
(
onTap:
()
{
context
,
_showAttachmentSheet
(
context
);
provider
.
paymentReferenceController
,
},
"Enter Payment Reference Number"
,
child:
Container
(
provider
.
updateReference
,
TextInputType
.
text
,
false
,
null
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
),
height:
45
,
errorWidget
(
context
,
provider
.
paymentreferenceerror
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
textControllerWidget
(
decoration:
BoxDecoration
(
context
,
color:
Color
(
0xFFE6F6FF
),
provider
.
descController
,
borderRadius:
BorderRadius
.
circular
(
12
),
"Enter Description"
,
border:
Border
.
all
(
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
descriptionError
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"File Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"File Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
Padding
(
P
adding
(
p
adding
:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignm
en
t
:
MainAxisAlignment
.
spaceBetween
,
childr
en:
[
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
fontSize:
11
,
font
Size:
11
,
font
Weight:
FontWeight
.
w600
fontWeight:
FontWeight
.
w600
),),
),),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imageP
icked
=
0
;
provider
.
imageP
ath
=
null
;
provider
.
imagePath
=
null
;
provider
.
image
File
Path
=
null
;
provider
.
imageFilePath
=
null
;
},
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
]
,
)
,
)
,
)
)
],
],
],
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/financeDashboard.dart
View file @
d24e453e
...
@@ -35,102 +35,104 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -35,102 +35,104 @@ class _FinancedashboardState extends State<Financedashboard> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Finance"
),
appBar:
appbar
(
context
,
"Finance"
),
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
SizedBox
(
child:
Column
(
child:
SingleChildScrollView
(
children:
[
child:
Column
(
ListView
.
builder
(
children:
[
itemCount:
provider
.
accessiblePagesList
.
length
,
ListView
.
builder
(
shrinkWrap:
true
,
itemCount:
provider
.
accessiblePagesList
.
length
,
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
index
)
{
physics:
NeverScrollableScrollPhysics
(),
Widget
?
SvgIcon
;
itemBuilder:
(
context
,
index
)
{
switch
(
provider
.
accessiblePagesList
[
index
].
mode
)
{
Widget
?
SvgIcon
;
case
"apr_lvl1"
:
switch
(
provider
.
accessiblePagesList
[
index
].
mode
)
{
SvgIcon
=
SvgPicture
.
asset
(
case
"apr_lvl1"
:
"assets/svg/fin_lv1.svg"
,
SvgIcon
=
SvgPicture
.
asset
(
);
"assets/svg/fin_lv1.svg"
,
break
;
case
"apr_lvl2"
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
,
);
break
;
default
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
break
;
}
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
if
(
provider
.
accessiblePagesList
[
index
].
pageName
==
"Payments List"
)
{
navigate
=
Paymentlistpaymentrequisition
(
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
);
);
}
else
if
(
provider
break
;
.
accessiblePagesList
[
index
]
case
"apr_lvl2"
:
.
pageName
==
SvgIcon
=
SvgPicture
.
asset
(
"Payment Receipts List"
)
{
"assets/svg/fin_lv2.svg"
,
navigate
=
Paymentreceiptlist
(
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
);
);
}
else
{
break
;
navigate
=
Allpaymentrequesitionlistsbymodes
(
mode:
provider
.
accessiblePagesList
[
index
].
mode
!,
default
:
pageTitleName:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
provider
break
;
.
accessiblePagesList
[
index
]
}
.
pageName
!,
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
if
(
provider
.
accessiblePagesList
[
index
].
pageName
==
"Payments List"
)
{
navigate
=
Paymentlistpaymentrequisition
(
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
);
}
else
if
(
provider
.
accessiblePagesList
[
index
]
.
pageName
==
"Payment Receipts List"
)
{
navigate
=
Paymentreceiptlist
(
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
);
}
else
{
navigate
=
Allpaymentrequesitionlistsbymodes
(
mode:
provider
.
accessiblePagesList
[
index
].
mode
!,
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
);
}
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
);
);
}
},
await
Navigator
.
push
(
child:
Container
(
context
,
margin:
EdgeInsets
.
symmetric
(
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
horizontal:
5
,
);
vertical:
5
,
},
),
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
5
,
vertical:
15
,
vertical:
5
,
),
),
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
color:
Colors
.
white
,
horizontal:
10
,
borderRadius:
BorderRadius
.
circular
(
14
),
vertical:
15
,
),
),
child:
Row
(
decoration:
BoxDecoration
(
children:
[
color:
Colors
.
white
,
Expanded
(
flex:
1
,
child:
SvgIcon
),
borderRadius:
BorderRadius
.
circular
(
14
),
Expanded
(
),
flex:
5
,
child:
Row
(
child:
Text
(
children:
[
"
${provider.accessiblePagesList[index].pageName}
"
,
Expanded
(
flex:
1
,
child:
SvgIcon
),
),
Expanded
(
flex:
5
,
child:
Text
(
"
${provider.accessiblePagesList[index].pageName}
"
,
),
),
),
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
"assets/svg/arrow_right_new.svg"
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
)
,
)
;
);
},
}
,
)
,
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/paymentDetailsPaymentRequisition.dart
View file @
d24e453e
...
@@ -50,149 +50,151 @@ class _PaymentdetailspaymentrequisitionState
...
@@ -50,149 +50,151 @@ class _PaymentdetailspaymentrequisitionState
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
widget
.
pageName
),
appBar:
appbar
(
context
,
widget
.
pageName
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
SizedBox
(
child:
Container
(
child:
SingleChildScrollView
(
decoration:
BoxDecoration
(
child:
Container
(
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
children:
[
child:
Column
(
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
width:
35
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
8.0
),
color:
Color
(
0xFFFFF3CE
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Text
(
Text
(
payment_det
.
accountName
??
"-"
,
payment_det
.
accountName
??
"-"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Family:
"JakartaMedium"
,
font
Size:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Text
(
Text
(
"₹
${payment_det.amount}
"
,
"₹
${payment_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
payment_det
.
refType
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
App
Color
s
.
app_blue
,
color:
Color
(
0xFF0D9C00
)
,
),
),
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
payment_det
.
refType
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
],
],
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
payment_det
.
attachmentViewFileName
!,
fileUrl:
payment_det
.
attachmentDirFilePath
!,
),
),
);
}
},
child:
Text
(
child:
Text
(
provider
.
Headings
[
j
]
==
"Attachment"
provider
.
Headings
[
j
],
?
"View"
:
"
${provider.subHeadings[j]}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
color:
AppColors
.
semi_black
,
provider
.
Headings
[
j
]
==
"Attachment"
),
?
AppColors
.
app_blue
),
:
Color
(
0xFF818181
),
),
decoration:
Expanded
(
provider
.
Headings
[
j
]
==
"Attachment"
child:
InkResponse
(
?
TextDecoration
.
underline
onTap:
()
{
:
TextDecoration
.
none
,
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
decorationColor:
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
payment_det
.
attachmentViewFileName
!,
fileUrl:
payment_det
.
attachmentDirFilePath
!,
),
),
);
}
},
child:
Text
(
provider
.
Headings
[
j
]
==
"Attachment"
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
?
"View"
:
AppColors
.
white
,
:
provider
.
subHeadings
[
j
]==
""
?
"-"
:
provider
.
subHeadings
[
j
]??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"Attachment"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
}),
})
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/paymentListPaymentRequisition.dart
View file @
d24e453e
...
@@ -18,16 +18,23 @@ class Paymentlistpaymentrequisition extends StatefulWidget {
...
@@ -18,16 +18,23 @@ class Paymentlistpaymentrequisition extends StatefulWidget {
}
}
class
_PaymentlistpaymentrequisitionState
extends
State
<
Paymentlistpaymentrequisition
>
{
class
_PaymentlistpaymentrequisitionState
extends
State
<
Paymentlistpaymentrequisition
>
{
late
Commondaterangefilter
cf
;
@override
@override
void
initState
()
{
void
initState
()
{
// TODO: implement initState
// TODO: implement initState
super
.
initState
();
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
cf
=
Commondaterangefilter
();
var
provider
=
Provider
.
of
<
Paymentrequisitionpaymentslistprovider
>(
var
provider
=
Provider
.
of
<
Paymentrequisitionpaymentslistprovider
>(
context
,
context
,
listen:
false
,
listen:
false
,
);
);
final
now
=
DateTime
.
now
();
final
range
=
DateTimeRange
(
start:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
end:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
);
final
dateRange
=
cf
.
getFormattedDateRange
(
range
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
});
});
}
}
...
@@ -87,232 +94,232 @@ class _PaymentlistpaymentrequisitionState extends State<Paymentlistpaymentrequis
...
@@ -87,232 +94,232 @@ class _PaymentlistpaymentrequisitionState extends State<Paymentlistpaymentrequis
),
),
),
),
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
?
Container
(
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
SingleChildScrollView
(
child:
Scrollbar
(
child:
Column
(
thumbVisibility:
false
,
children:
[
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
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:
[
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
width:
35
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
8.0
),
color:
Color
(
0xFFFFF3CE
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
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
].
receipientAccount
!,
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
(
child:
SvgPicture
.
asset
(
flex:
2
,
"assets/svg/fin_ic.svg"
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
requestLists
[
index
].
refType
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
]
,
)
,
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
SizedBox
(
width:
10
),
...
List
.
generate
(
4
,
(
j
)
{
Expanded
(
final
headings
=
[
flex:
4
,
"Request Mode"
,
child:
SizedBox
(
"Attachment"
,
child:
Column
(
"Payment Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestMode
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
paymentDate
,
requestLists
[
index
].
description
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Text
(
child:
Text
(
requestLists
[
index
].
receipientAccount
!,
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
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
(
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
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailspaymentrequisition
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
Text
(
"
View Details
"
,
"
₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
),
),
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
],
),
),
),
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
requestLists
[
index
].
refType
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
],
],
),
),
);
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
},
...
List
.
generate
(
5
,
(
j
)
{
),
final
headings
=
[
],
"To Account"
,
"Request Mode"
,
"Attachment"
,
"Payment Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
payAccount
,
requestLists
[
index
].
requestMode
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
paymentDate
,
requestLists
[
index
].
description
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
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
,
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailspaymentrequisition
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
),
);
},
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 @
d24e453e
...
@@ -49,126 +49,128 @@ class _PaymentreceiptdetailsState
...
@@ -49,126 +49,128 @@ class _PaymentreceiptdetailsState
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
widget
.
pageName
),
appBar:
appbar
(
context
,
widget
.
pageName
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Container
(
child:
SingleChildScrollView
(
decoration:
BoxDecoration
(
child:
Container
(
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
children:
[
child:
Column
(
Row
(
children:
[
children:
[
Row
(
Expanded
(
children:
[
flex:
1
,
Expanded
(
child:
Container
(
flex:
1
,
height:
50
,
child:
Container
(
width:
35
,
height:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
width:
35
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
8.0
),
color:
Color
(
0xFFFFF3CE
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
childr
en:
[
children:
[
Text
(
Text
(
payment_det
.
receipientAccount
??
"-"
,
payment_det
.
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
(
"₹
${payment_det.amount}
"
,
"₹
${payment_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
(
)
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
build
er
:
(
context
)
=>
Fileview
er
(
(
context
)
=>
Fileviewer
(
fileName:
fileName:
payment_det
payment_det
.
attachmentViewFileName
!,
.
attachmentViewFileName
!,
fileUrl:
fileUrl:
payment_det
payment_det
.
attachmentDirFilePath
!,
.
attachmentDirFilePath
!
,
)
,
),
),
),
);
);
}
}
},
},
child:
Text
(
child:
Text
(
provider
.
Headings
[
j
]
==
"Attachment"
?
"View"
:
"
${provider.subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"Attachment"
provider
.
Headings
[
j
]
==
"Attachment"
?
TextDecoration
.
underline
?
"View"
:
TextDecoration
.
none
,
:
provider
.
subHeadings
[
j
]==
""
?
"-"
:
provider
.
subHeadings
[
j
]??
"-"
,
decorationColor:
style:
TextStyle
(
provider
.
Headings
[
j
]
==
"Attachment"
fontSize:
14
,
?
AppColors
.
app_blue
color:
:
AppColors
.
white
,
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"Attachment"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"Attachment"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
}),
})
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/finance/paymentreceiptList.dart
View file @
d24e453e
...
@@ -89,206 +89,206 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -89,206 +89,206 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
),
),
),
),
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
?
SingleChildScrollView
(
)):
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Column
(
child:
Scrollbar
(
children:
[
child:
ListView
.
builder
(
ListView
.
builder
(
itemCount:
requestLists
.
length
,
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
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
(
"assets/svg/fin_ic.svg"
,
),
),
),
),
child:
SvgPicture
.
asset
(
SizedBox
(
width:
10
),
"assets/svg/fin_ic.svg"
,
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
].
receipientAccount
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
),
),
],
SizedBox
(
width:
10
),
),
Expanded
(
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
flex:
4
,
...
List
.
generate
(
4
,
(
j
)
{
child:
SizedBox
(
final
headings
=
[
child:
Column
(
"Request Mode"
,
crossAxisAlignment:
"Attachment"
,
CrossAxisAlignment
.
start
,
"Receipt Date"
,
children:
[
"Note"
,
Text
(
];
requestLists
[
index
].
receipientAccount
!,
final
subHeadings
=
[
requestLists
[
index
].
requestMode
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
receiptDate
,
requestLists
[
index
].
description
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
Text
(
Expanded
(
"₹
${requestLists[index].amount}
"
,
child:
InkResponse
(
style:
TextStyle
(
onTap:
fontFamily:
"JakartaMedium"
,
j
!=
1
fontSize:
14
,
?
null
color:
AppColors
.
app_blue
,
:
()
{
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
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
),
),
);
),
},
),
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
],
child:
Row
(
),
crossAxisAlignment:
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
CrossAxisAlignment
.
center
,
...
List
.
generate
(
4
,
(
j
)
{
mainAxisAlignment:
MainAxisAlignment
.
start
,
final
headings
=
[
children:
[
"Receipt Account"
,
Text
(
"Request Mode"
,
"View Details"
,
"Attachment"
,
"Receipt Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
receipientAccount
,
requestLists
[
index
].
requestMode
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
receiptDate
,
requestLists
[
index
].
description
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
),
),
SizedBox
(
width:
5
),
),
SvgPicture
.
asset
(
Expanded
(
"assets/svg/next_button.svg"
,
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
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
,
),
),
),
),
],
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
),
),
);
},
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 @
d24e453e
...
@@ -56,128 +56,37 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -56,128 +56,37 @@ class _SubmitpaymentrequestionlistsbymodeState
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
appBar:
appbar2
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
,)),
body:
Container
(
body:
SafeArea
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Container
(
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
),
child:
SingleChildScrollView
(
),
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
TextWidget
(
context
,
"Select Account"
),
children:
[
DropdownButtonHideUnderline
(
TextWidget
(
context
,
"Select Account"
),
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Accounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
accounts
.
map
(
(
accs
)
=>
DropdownMenuItem
<
Accounts
>(
value:
accs
,
child:
Text
(
accs
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedAccount
,
onChanged:
(
widget
.
mode
==
"self"
&&
provider
.
accounts
.
length
==
1
)
?
null
:
(
Accounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
accounts
.
isNotEmpty
)
{
provider
.
selectedAccount
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
accountId
=
value
.
id
!;
print
(
"hfjkshfg"
+
provider
.
accountId
.
toString
(),
);
}
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
],
),
),
errorWidget
(
context
,
provider
.
selectAccountError
),
if
([
"self"
,
"admin"
].
contains
(
widget
.
mode
))
...[
TextWidget
(
context
,
"Select Requisition Type"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
String
>(
child:
DropdownButton2
<
Accounts
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
'Select
Reques
t Type'
,
'Select
Accoun
t Type'
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
requestingPurpose
s
provider
.
account
s
.
map
(
.
map
(
(
accs
)
=>
DropdownMenuItem
<
String
>(
(
accs
)
=>
DropdownMenuItem
<
Accounts
>(
value:
accs
,
value:
accs
,
child:
Text
(
child:
Text
(
accs
??
''
,
accs
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
...
@@ -186,19 +95,26 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -186,19 +95,26 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectReqPurpose
,
value:
provider
.
selectedAccount
,
onChanged:
onChanged:
(
String
?
value
)
{
(
widget
.
mode
==
"self"
&&
if
(
value
!=
null
)
{
provider
.
accounts
.
length
==
1
)
provider
.
selectReqPurpose
=
value
;
?
null
print
(
"Selected Complaint Type:
${value}
,"
);
:
(
Accounts
?
value
)
{
if
(
value
!=
null
)
{
print
(
if
(
provider
.
accounts
.
isNotEmpty
)
{
"hfjkshfg"
+
provider
.
selectedAccount
=
value
;
provider
.
selectReqPurpose
.
toString
(),
print
(
);
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
}
);
},
provider
.
accountId
=
value
.
id
!;
print
(
"hfjkshfg"
+
provider
.
accountId
.
toString
(),
);
}
}
},
buttonStyleData:
ButtonStyleData
(
buttonStyleData:
ButtonStyleData
(
height:
50
,
height:
50
,
width:
160
,
width:
160
,
...
@@ -212,7 +128,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -212,7 +128,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
),
),
iconStyleData:
IconStyleData
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
...
@@ -225,8 +141,9 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -225,8 +141,9 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
scrollbarTheme:
ScrollbarThemeData
(
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
radius:
const
Radius
.
circular
(
15
),
thickness:
thickness:
MaterialStateProperty
.
all
<
double
>(
MaterialStateProperty
.
all
<
double
>(
6
),
6
,
),
thumbVisibility:
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
...
@@ -240,227 +157,312 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -240,227 +157,312 @@ class _SubmitpaymentrequestionlistsbymodeState
],
],
),
),
),
),
]
else
...[
errorWidget
(
context
,
provider
.
selectAccountError
),
textControllerWidget
(
context
,
if
([
"self"
,
"admin"
].
contains
(
widget
.
mode
))
...[
provider
.
reqPurposeController
,
TextWidget
(
context
,
"Select Requisition Type"
),
"Enter Request Purpose"
,
DropdownButtonHideUnderline
(
provider
.
updateReqPupose
,
TextInputType
.
text
,
false
,
null
child:
Row
(
),
children:
[
],
Expanded
(
errorWidget
(
context
,
provider
.
reqPurposeError
),
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
textControllerWidget
(
hint:
Text
(
context
,
'Select Request Type'
,
provider
.
descController
,
style:
TextStyle
(
fontSize:
14
),
"Enter Description"
,
overflow:
TextOverflow
.
ellipsis
,
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
),
),
items:
errorWidget
(
context
,
provider
.
descriptionError
),
provider
.
requestingPurposes
.
map
(
textControllerWidget
(
(
accs
)
=>
DropdownMenuItem
<
String
>(
context
,
value:
accs
,
provider
.
amountController
,
"Enter Amount"
,
provider
.
updateAmount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
errorWidget
(
context
,
provider
.
amountError
),
TextWidget
(
context
,
"Select Payment Mode"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
PaymentModes
>(
isExpanded:
true
,
hint:
Text
(
'Select Payment mode'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
paymentModes
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
PaymentModes
>(
value:
paymenents
,
child:
Text
(
child:
Text
(
paymenents
.
name
??
''
,
accs
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedPayment
,
value:
provider
.
selectReqPurpose
,
onChanged:
(
PaymentModes
?
value
)
{
if
(
value
!=
null
)
{
onChanged:
(
String
?
value
)
{
if
(
provider
.
paymentModes
.
isNotEmpty
)
{
if
(
value
!=
null
)
{
provider
.
selectedPayment
=
value
;
provider
.
selectReqPurpose
=
value
;
print
(
print
(
"Selected Complaint Type:
${value}
,"
);
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
print
(
provider
.
paymentModeId
=
value
.
id
!;
"hfjkshfg"
+
provider
.
paymentModeValue
=
value
.
name
!;
provider
.
selectReqPurpose
.
toString
(),
print
(
);
"hfjkshfg"
+
}
provider
.
paymentModeId
.
toString
(),
},
);
buttonStyleData:
ButtonStyleData
(
}
height:
50
,
}
width:
160
,
},
padding:
const
EdgeInsets
.
only
(
buttonStyleData:
ButtonStyleData
(
left:
14
,
height:
50
,
right:
14
,
width:
160
,
),
padding:
const
EdgeInsets
.
only
(
decoration:
BoxDecoration
(
left:
14
,
borderRadius:
BorderRadius
.
circular
(
14
),
right:
14
,
color:
AppColors
.
text_field_color
,
),
),
decoration:
BoxDecoration
(
),
borderRadius:
BorderRadius
.
circular
(
14
),
iconStyleData:
IconStyleData
(
color:
AppColors
.
text_field_color
,
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
),
iconSize:
12
,
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconStyleData:
IconStyleData
(
iconDisabledColor:
Colors
.
grey
,
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
),
iconSize:
12
,
dropdownStyleData:
DropdownStyleData
(
iconEnabledColor:
Color
(
0xFF2D2D2D
),
maxHeight:
200
,
iconDisabledColor:
Colors
.
grey
,
decoration:
BoxDecoration
(
),
borderRadius:
BorderRadius
.
circular
(
14
),
dropdownStyleData:
DropdownStyleData
(
color:
AppColors
.
text_field_color
,
maxHeight:
200
,
),
decoration:
BoxDecoration
(
scrollbarTheme:
ScrollbarThemeData
(
borderRadius:
BorderRadius
.
circular
(
14
),
radius:
const
Radius
.
circular
(
15
),
color:
AppColors
.
text_field_color
,
thickness:
),
MaterialStateProperty
.
all
<
double
>(
6
),
scrollbarTheme:
ScrollbarThemeData
(
thumbVisibility:
radius:
const
Radius
.
circular
(
15
),
MaterialStateProperty
.
all
<
bool
>(
true
),
thickness:
MaterialStateProperty
.
all
<
double
>(
),
6
,
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
],
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
],
),
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
),
child:
Center
(
]
else
...[
child:
Text
(
textControllerWidget
(
"File Attachment"
,
context
,
style:
TextStyle
(
provider
.
reqPurposeController
,
fontFamily:
"JakartaMedium"
,
"Enter Request Purpose"
,
color:
AppColors
.
app_blue
,
provider
.
updateReqPupose
,
TextInputType
.
text
,
false
,
null
),
),
),
),
),
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
,))
],
),
),
)
],
],
errorWidget
(
context
,
provider
.
reqPurposeError
),
errorWidget
(
context
,
provider
.
FileError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankAccNumber
Controller
,
provider
.
desc
Controller
,
"Enter
Account Number
"
,
"Enter
Description
"
,
provider
.
update
Number
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
provider
.
update
Description
,
TextInputType
.
text
,
false
,
null
),
),
errorWidget
(
context
,
provider
.
bankNumber
Error
),
errorWidget
(
context
,
provider
.
description
Error
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankIfsc
Controller
,
provider
.
amount
Controller
,
"Enter
Bank IFSC
"
,
"Enter
Amount
"
,
provider
.
update
IFSC
,
TextInputType
.
text
,
false
,
null
provider
.
update
Amount
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
errorWidget
(
context
,
provider
.
amountError
),
textControllerWidget
(
TextWidget
(
context
,
"Select Payment Mode"
),
context
,
DropdownButtonHideUnderline
(
provider
.
bankAcHolderController
,
child:
Row
(
"Enter Bank Account Holder Name"
,
children:
[
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
Expanded
(
child:
DropdownButton2
<
PaymentModes
>(
isExpanded:
true
,
hint:
Text
(
'Select Payment mode'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
paymentModes
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
PaymentModes
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedPayment
,
onChanged:
(
PaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
paymentModes
.
isNotEmpty
)
{
provider
.
selectedPayment
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
paymentModeId
=
value
.
id
!;
provider
.
paymentModeValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
paymentModeId
.
toString
(),
);
}
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
],
),
),
),
errorWidget
(
context
,
provider
.
bankHolderError
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...[
textControllerWidget
(
InkResponse
(
context
,
onTap:
()
{
provider
.
amountController
,
_showAttachmentSheet
(
context
);
"Enter UPI ID"
,
},
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"File Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
errorWidget
(
context
,
provider
.
UPIError
),
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
,))
],
),
)
],
errorWidget
(
context
,
provider
.
FileError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
context
,
provider
.
bankAcHolderController
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...[
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter UPI ID"
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
),
errorWidget
(
context
,
provider
.
UPIError
),
],
],
],
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/genTracker/ComplaintHistory.dart
View file @
d24e453e
...
@@ -39,93 +39,95 @@ class _ComplainthistoryState extends State<Complainthistory> {
...
@@ -39,93 +39,95 @@ class _ComplainthistoryState extends State<Complainthistory> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Complaint History"
),
appBar:
appbar
(
context
,
"Complaint History"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
child:
Column
(
children:
[
if
(
provider
.
complaintList
.
isNotEmpty
)...[
children:
[
ListView
.
builder
(
if
(
provider
.
complaintList
.
isNotEmpty
)...[
shrinkWrap:
true
,
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
provider
.
complaintList
.
length
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemCount:
provider
.
complaintList
.
length
,
return
Column
(
itemBuilder:
(
context
,
index
)
{
crossAxisAlignment:
CrossAxisAlignment
.
start
,
return
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
Text
(
"
${ provider.complaintList[index].compRegdate}
"
,
style:
TextStyle
(
children:
[
color:
Color
(
0xFF818181
)
Text
(
"
${ provider.complaintList[index].compRegdate}
"
,
style:
TextStyle
(
),),
color:
Color
(
0xFF818181
)
Container
(
),),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
Container
(
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
),
children:
[
child:
Column
(
children:
[
...
List
.
generate
(
4
,
(
index
)
{
final
headings
=
[
...
List
.
generate
(
4
,
(
index
)
{
"Technician Name"
,
final
headings
=
[
"ID"
,
"Technician Name"
,
"Complaint Type"
,
"ID"
,
"Complaint Status"
,];
"Complaint Type"
,
"Complaint Status"
,];
final
values
=
[
provider
.
complaintList
[
index
].
techName
,
final
values
=
[
provider
.
complaintList
[
index
].
compId
,
provider
.
complaintList
[
index
].
techName
,
provider
.
complaintList
[
index
].
compType
,
provider
.
complaintList
[
index
].
compId
,
provider
.
complaintList
[
index
].
compStatus
,
provider
.
complaintList
[
index
].
compType
,
provider
.
complaintList
[
index
].
compStatus
,
];
return
Container
(
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
15
),
child:
Row
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
15
),
children:
[
child:
Row
(
Expanded
(
children:
[
child:
SizedBox
(
Expanded
(
child:
Column
(
child:
SizedBox
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
mainAxisAlignment:
MainAxisAlignment
.
start
,
Text
(
"
${headings[index]}
"
),
children:
[
Text
(
"
${headings[index]}
"
),
],
],
),
),
),
),
),
),
Expanded
(
Expanded
(
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
cross
AxisAlignment:
Cross
AxisAlignment
.
start
,
main
AxisAlignment:
Main
AxisAlignment
.
start
,
mainAxisAlignm
en
t
:
MainAxisAlignment
.
start
,
childr
en:
[
children:
[
Text
(
"
${values[index]}
"
,
Text
(
"
${values[index]}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
)
color:
Color
(
0xFF818181
)
),),
),),
],
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
},),
},),
]
]
),
),
),
)
,
]
,
],
);
);
},),
},),
]
else
...[
]
else
...[
Emptywidget
(
context
)
Emptywidget
(
context
)
]
]
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/genTracker/GenTrackerDashboard.dart
View file @
d24e453e
...
@@ -20,68 +20,70 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
...
@@ -20,68 +20,70 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Tracker"
),
appBar:
appbar
(
context
,
"Gen Tracker"
),
body:
GridView
.
builder
(
body:
SafeArea
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
GridView
.
builder
(
itemCount:
4
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
itemCount:
4
,
crossAxisCount:
2
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisSpacing:
10
,
crossAxisCount:
2
,
mainAxisSpacing:
10
,
crossAxisSpacing:
10
,
),
mainAxisSpacing:
10
,
itemBuilder:
(
context
,
index
)
{
),
final
names
=
[
itemBuilder:
(
context
,
index
)
{
"Generator Details"
,
final
names
=
[
"Register Complaint"
,
"Generator Details"
,
"Tag Location"
,
"Register Complaint"
,
"Tag Generator"
,
"Tag Location"
,
"Tag Generator"
,
];
final
icons
=
[
];
"gent_gen_det"
,
final
icons
=
[
"gent_reg_comp"
,
"gent_gen_det"
,
"gent_tag_loc"
,
"gent_reg_comp"
,
"gent_tag_den"
,
"gent_tag_loc"
,
];
"gent_tag_den"
,
return
InkResponse
(
];
onTap:
()
{
return
InkResponse
(
switch
(
names
[
index
])
{
onTap:
()
{
case
"Generator Details"
:
switch
(
names
[
index
])
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Scanentergeneratoridscreen
(
from:
"Generator Details"
,)));
case
"Generator Details"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Scanentergeneratoridscreen
(
from:
"Generator Details"
,)));
case
"Register Complaint"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Scanentergeneratoridscreen
(
from:
"Register Complaint"
,)));
case
"Register Complaint"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Scanentergeneratoridscreen
(
from:
"Register Complaint"
,)));
case
"Tag Location"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)=>
Scanentergeneratoridscreen
(
from:
"Tag Location"
,)));
case
"Tag Location"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)=>
Scanentergeneratoridscreen
(
from:
"Tag Location"
,)));
case
"Tag Generator"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)=>
Scanentergeneratoridscreen
(
from:
"Tag Generator"
,)));
case
"Tag Generator"
:
break
;
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)=>
Scanentergeneratoridscreen
(
from:
"Tag Generator"
,)));
break
;
default
:
print
(
"111"
);
default
:
break
;
print
(
"111"
);
}
break
;
},
}
child:
Container
(
},
decoration:
BoxDecoration
(
child:
Container
(
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
30
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
30
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/
${icons[index]}
.svg"
,
),
SizedBox
(
height:
10
,),
Text
(
names
[
index
]),
],
),
),
),
child:
Column
(
);
crossAxisAlignment:
CrossAxisAlignment
.
center
,
},
mainAxisAlignment:
MainAxisAlignment
.
center
,
),
children:
[
SvgPicture
.
asset
(
"assets/svg/
${icons[index]}
.svg"
,
),
SizedBox
(
height:
10
,),
Text
(
names
[
index
]),
],
),
),
);
},
),
),
),
),
);
);
...
...
lib/screens/genTracker/GeneratorDetails.dart
View file @
d24e453e
...
@@ -98,140 +98,80 @@ class _GeneratordetailsState extends State<Generatordetails> {
...
@@ -98,140 +98,80 @@ class _GeneratordetailsState extends State<Generatordetails> {
?
appbar2
(
context
,
"Generator Details"
,
provider
.
resetForm
,
sendwidget
)
?
appbar2
(
context
,
"Generator Details"
,
provider
.
resetForm
,
sendwidget
)
:
appbar
(
context
,
"Generator Details"
),
:
appbar
(
context
,
"Generator Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
Container
(
children:
[
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
Container
(
child:
Text
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
"Customer Details"
,
child:
Text
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
"Customer Details"
,
fontFamily:
"JakartaMedium"
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontFamily:
"JakartaMedium"
),
),
),
),
),
Container
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
horizontal:
15
,
vertical:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
vertical:
3
,
horizontal:
0
,
horizontal:
0
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
SvgPicture
.
asset
(
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
"assets/svg/se_block_head.svg"
,
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
Column
(
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
SizedBox
(
SizedBox
(
width:
width:
MediaQuery
.
of
(
MediaQuery
.
of
(
context
,
context
,
).
size
.
width
*
).
size
.
width
*
0.75
,
0.75
,
child:
Text
(
"
${provider.cname}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
),
),
),
SizedBox
(
// height:45,
width:
MediaQuery
.
of
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
"
${provider.aname}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
),
),
),
],
),
],
),
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
3
,
(
j
)
{
final
textheads
=
[
"Mobile Number"
,
"Contact Person Number"
,
"Mail ID"
,
];
final
textSubheads
=
[
"
${provider.mob1}
"
,
"
${provider.mob2}
"
,
"
${provider.mail}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
),
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
child:
Text
(
child:
Text
(
textheads
[
j
].
toString
()
,
"
${provider.cname}
"
,
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
fontSize:
14
),
),
),
),
),
),
),
SizedBox
(
SizedBox
(
width:
5
,),
// height:45,
Expanded
(
width:
flex:
2
,
MediaQuery
.
of
(
child:
SizedBox
(
context
,
).
size
.
width
*
0.75
,
child:
Text
(
child:
Text
(
textSubheads
[
j
]
,
"
${provider.aname}
"
,
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
Color
(
color:
Color
(
...
@@ -240,96 +180,158 @@ class _GeneratordetailsState extends State<Generatordetails> {
...
@@ -240,96 +180,158 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
),
),
),
),
),
],
],
),
),
],
);
),
}),
),
),
Column
(
],
crossAxisAlignment:
CrossAxisAlignment
.
start
,
),
children:
List
.
generate
(
3
,
(
j
)
{
),
final
textheads
=
[
"Mobile Number"
,
Container
(
"Contact Person Number"
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
"Mail ID"
,
child:
Text
(
];
"Generator Details"
,
final
textSubheads
=
[
style:
TextStyle
(
color:
Color
(
0xFF818181
),
"
${provider.mob1}
"
,
fontFamily:
"JakartaMedium"
),
"
${provider.mob2}
"
,
),
"
${provider.mail}
"
,
),
];
Container
(
return
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
15
,
horizontal:
0
,
vertical:
10
,
),
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
),
),
),
),
SizedBox
(
width:
5
,),
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
),
),
),
),
],
),
);
}),
),
],
),
),
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
Container
(
borderRadius:
BorderRadius
.
circular
(
20
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
child:
Text
(
"Generator Details"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontFamily:
"JakartaMedium"
),
),
),
),
child:
Column
(
Container
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
children:
List
.
generate
(
6
,
(
j
)
{
padding:
EdgeInsets
.
symmetric
(
final
textheads
=
[
horizontal:
15
,
"Gen ID"
,
vertical:
10
,
"Engine Number"
,
),
"Address"
,
decoration:
BoxDecoration
(
"Product Name"
,
color:
Colors
.
white
,
"Engine Model"
,
borderRadius:
BorderRadius
.
circular
(
20
),
"Date Of Supply"
,
),
];
child:
Column
(
final
textSubheads
=
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
"
${provider.genID}
"
,
children:
List
.
generate
(
6
,
(
j
)
{
"
${provider.engineNo}
"
,
final
textheads
=
[
"
${provider.address}
"
,
"Gen ID"
,
"
${provider.spname}
"
,
"Engine Number"
,
"
${provider.emodel}
"
,
"Address"
,
"
${provider.dateOfEngineSale}
"
,
"Product Name"
,
];
"Engine Model"
,
return
Container
(
"Date Of Supply"
,
padding:
EdgeInsets
.
symmetric
(
];
vertical:
6
,
final
textSubheads
=
[
horizontal:
0
,
"
${provider.genID}
"
,
),
"
${provider.engineNo}
"
,
child:
Row
(
"
${provider.address}
"
,
crossAxisAlignment:
"
${provider.spname}
"
,
CrossAxisAlignment
.
start
,
"
${provider.emodel}
"
,
children:
[
"
${provider.dateOfEngineSale}
"
,
Expanded
(
];
flex:
1
,
return
Container
(
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
padding:
EdgeInsets
.
symmetric
(
fontSize:
14
,
vertical:
6
,
fontFamily:
"JakartaMedium"
horizontal:
0
,
),),),
),
SizedBox
(
width:
5
,),
child:
Row
(
Expanded
(
crossAxisAlignment:
flex:
2
,
CrossAxisAlignment
.
start
,
child:
SizedBox
(
children:
[
Expanded
(
child:
Text
(
flex:
1
,
textSubheads
[
j
],
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
Color
(
fontFamily:
"JakartaMedium"
0xFF818181
,
),),),
SizedBox
(
width:
5
,),
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
)
,
)
;
);
}),
}
),
),
),
),
),
SizedBox
(
height:
75
),
SizedBox
(
height:
75
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/genTracker/RegisterComplaint.dart
View file @
d24e453e
...
@@ -29,582 +29,584 @@ class _RegistercomplaintState extends State<Registercomplaint> {
...
@@ -29,582 +29,584 @@ class _RegistercomplaintState extends State<Registercomplaint> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Register Complaint"
),
appBar:
appbar
(
context
,
"Register Complaint"
),
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
SizedBox
(
height:
5.0
),
children:
[
Container
(
SizedBox
(
height:
5.0
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
0
,
10
,
0
),
Container
(
padding:
EdgeInsets
.
fromLTRB
(
10
,
0
,
10
,
0
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
SizedBox
(
height:
25
),
children:
[
Container
(
SizedBox
(
height:
25
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
Container
(
child:
Text
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
"Customer Details"
,
child:
Text
(
style:
TextStyle
(
"Customer Details"
,
fontFamily:
"JakartaMedium"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
fontFamily:
"JakartaMedium"
,
),
color:
Color
(
0xFF818181
)),
),
),
Container
(
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
),
),
child:
Column
(
Container
(
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
children:
[
margin:
EdgeInsets
.
symmetric
(
Row
(
horizontal:
10
,
vertical:
5
),
crossAxisAlignment:
CrossAxisAlignment
.
center
,
decoration:
BoxDecoration
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
color:
Colors
.
white
,
children:
[
borderRadius:
BorderRadius
.
circular
(
16
)
Expanded
(
),
flex:
1
,
child:
Column
(
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
children:
[
),
Row
(
),
crossAxisAlignment:
CrossAxisAlignment
.
center
,
SizedBox
(
width:
10
),
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
Expanded
(
flex:
9
,
flex:
1
,
child:
SizedBox
(
child:
SvgPicture
.
asset
(
child:
Column
(
"assets/svg/se_block_head.svg"
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.cname}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
Text
(
"
${provider.aname}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
// Text("Gen Pvt. Ltd"),
],
),
),
),
),
),
SizedBox
(
width:
10
),
],
),
Expanded
(
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
flex:
9
,
...
List
.
generate
(
2
,
(
j
)
{
child:
SizedBox
(
final
textheads
=
[
"Product Name"
,
"Engine ID"
];
child:
Column
(
final
textSubheads
=
[
crossAxisAlignment:
provider
.
spname
,
CrossAxisAlignment
.
start
,
provider
.
engineNo
,
children:
[
];
Text
(
"
${provider.cname}
"
,
style:
TextStyle
(
return
Container
(
fontFamily:
"JakartaMedium"
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
),),
child:
Column
(
Text
(
children:
[
"
${provider.aname}
"
,
Row
(
maxLines:
2
,
mainAxisAlignment:
overflow:
TextOverflow
.
ellipsis
,
MainAxisAlignment
.
spaceBetween
,
style:
TextStyle
(
children:
[
color:
Color
(
0xFF818181
),
Expanded
(
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
],
),
),
),
Expanded
(
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textSubheads
[
j
].
toString
(),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
],
),
),
),
),
),
// Text("Gen Pvt. Ltd"),
],
],
),
),
),
],
),
),
],
);
),
}),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
SizedBox
(
height:
10.0
),
...
List
.
generate
(
2
,
(
j
)
{
final
textheads
=
[
"Product Name"
,
"Engine ID"
];
final
textSubheads
=
[
],
provider
.
spname
,
),
provider
.
engineNo
,
),
];
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Text
(
child:
Column
(
"Complaint Details"
,
children:
[
style:
TextStyle
(
Row
(
fontFamily:
"JakartaMedium"
,
mainAxisAlignment:
color:
Color
(
0xFF818181
)),
MainAxisAlignment
.
spaceBetween
,
),
),
Container
(
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Complaint Type"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),),
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
ComplaintTypeList
>(
isExpanded:
true
,
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
SizedBox
(
'Select Complaint Type'
,
child:
Column
(
style:
TextStyle
(
crossAxisAlignment:
fontSize:
14
,
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
],
),
),
),
Expanded
(
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textSubheads
[
j
].
toString
(),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
],
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
],
],
),
),
items:
],
provider
.
complaintTypeDropdown
),
.
map
(
);
(
complaintType
)
=>
}),
DropdownMenuItem
<
SizedBox
(
height:
10.0
),
ComplaintTypeList
>(
value:
complaintType
,
],
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Text
(
"Complaint Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
)),
),
),
Container
(
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Complaint Type"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),),
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
ComplaintTypeList
>(
isExpanded:
true
,
hint:
const
Row
(
children:
[
Expanded
(
child:
Text
(
child:
Text
(
c
omplaintType
.
name
??
'
'
,
'Select C
omplaint
Type'
,
style:
const
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
overflow:
TextOverflow
.
ellipsis
,
.
ellipsis
,
),
),
),
),
)
],
.
toList
(),
),
value:
provider
.
selectedComplaintType
,
items:
onChanged:
(
ComplaintTypeList
?
value
)
{
provider
.
complaintTypeDropdown
if
(
value
!=
null
)
{
.
map
(
if
(
provider
(
complaintType
)
=>
.
complaintCategorydropdown
DropdownMenuItem
<
.
isNotEmpty
)
{
ComplaintTypeList
>(
provider
.
selectedComplaintType
=
value:
complaintType
,
value
;
child:
Text
(
print
(
complaintType
.
name
??
''
,
"Selected Complaint Type:
${value
style:
const
TextStyle
(
.name}
, ID:
${value.id}
"
,
fontSize:
14
,
);
),
provider
.
selectedType
=
overflow:
TextOverflow
value
?.
name
;
.
ellipsis
,
provider
.
selectedTypeId
=
),
value
?.
id
;
),
print
(
)
"hfjkshfg"
+
.
toList
(),
provider
.
selectedTypeId
value:
provider
.
selectedComplaintType
,
.
toString
(),
onChanged:
(
ComplaintTypeList
?
value
)
{
);
if
(
value
!=
null
)
{
if
(
provider
.
complaintCategorydropdown
.
isNotEmpty
)
{
provider
.
selectedComplaintType
=
value
;
print
(
"Selected Complaint Type:
${value
.name}
, ID:
${value.id}
"
,
);
provider
.
selectedType
=
value
?.
name
;
provider
.
selectedTypeId
=
value
?.
id
;
print
(
"hfjkshfg"
+
provider
.
selectedTypeId
.
toString
(),
);
}
}
}
}
},
},
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
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
),
decoration:
BoxDecoration
(
iconStyleData:
IconStyleData
(
borderRadius:
BorderRadius
.
circular
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
14
),
iconSize:
12
,
color:
AppColors
.
text_field_color
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
),
),
),
dropdownStyleData:
DropdownStyleData
(
iconStyleData:
IconStyleData
(
maxHeight:
200
,
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
width:
350
,
iconSize:
12
,
decoration:
BoxDecoration
(
iconEnabledColor:
Color
(
0xFF2D2D2D
),
borderRadius:
BorderRadius
.
circular
(
iconDisabledColor:
Colors
.
grey
,
14
),
),
color:
AppColors
.
text_field_color
,
dropdownStyleData:
DropdownStyleData
(
),
maxHeight:
200
,
scrollbarTheme:
ScrollbarThemeData
(
width:
350
,
radius:
const
Radius
.
circular
(
15
),
decoration:
BoxDecoration
(
thickness:
MaterialStateProperty
borderRadius:
BorderRadius
.
circular
(
.
all
<
double
>(
6
),
14
),
thumbVisibility:
color:
AppColors
.
text_field_color
,
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
scrollbarTheme:
ScrollbarThemeData
(
menuItemStyleData:
const
MenuItemStyleData
(
radius:
const
Radius
.
circular
(
15
),
height:
40
,
thickness:
MaterialStateProperty
padding:
EdgeInsets
.
only
(
.
all
<
double
>(
6
),
left:
14
,
right:
14
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Complaint Category"
,
style:
TextStyle
(
child:
Text
(
"Complaint Category"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
),),
),),
),
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
child:
DropdownButton2
<
ComplaintCategoryList
>(
ComplaintCategoryList
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
'Select Complaint Category'
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
items:
provider
.
complaintCategorydropdown
.
map
(
(
Category
)
=>
DropdownMenuItem
<
ComplaintCategoryList
>(
value:
Category
,
child:
Text
(
child:
Text
(
Category
.
name
??
""
,
'Select Complaint Category'
,
style:
const
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
overflow:
TextOverflow
.
ellipsis
,
.
ellipsis
,
),
),
),
),
)
],
.
toList
(),
value:
provider
.
selectedCategoryType
,
onChanged:
(
ComplaintCategoryList
?
value
)
{
if
(
provider
.
complaintCategorydropdown
.
isNotEmpty
)
{
provider
.
selectedCategoryType
=
value
;
provider
.
selectedCategory
=
value
?.
name
;
provider
.
selectedCategoryId
=
value
?.
id
;
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
),
decoration:
BoxDecoration
(
items:
borderRadius:
BorderRadius
.
circular
(
provider
.
complaintCategorydropdown
14
),
.
map
(
color:
AppColors
.
text_field_color
,
(
Category
)
=>
DropdownMenuItem
<
ComplaintCategoryList
>(
value:
Category
,
child:
Text
(
Category
.
name
??
""
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedCategoryType
,
onChanged:
(
ComplaintCategoryList
?
value
)
{
if
(
provider
.
complaintCategorydropdown
.
isNotEmpty
)
{
provider
.
selectedCategoryType
=
value
;
provider
.
selectedCategory
=
value
?.
name
;
provider
.
selectedCategoryId
=
value
?.
id
;
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
),
),
iconStyleData:
IconStyleData
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
width:
350
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
width:
350
,
MaterialStateProperty
.
all
<
double
>(
decoration:
BoxDecoration
(
6
),
borderRadius:
BorderRadius
.
circular
(
thumbVisibility:
14
),
MaterialStateProperty
.
all
<
bool
>(
color:
AppColors
.
text_field_color
,
true
),
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
MaterialStateProperty
.
all
<
double
>(
6
),
thumbVisibility:
MaterialStateProperty
.
all
<
bool
>(
true
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Select Description"
,
style:
TextStyle
(
child:
Text
(
"Select Description"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
),),
),),
),
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
child:
DropdownButton2
<
ComplaintDescriptionList
>(
ComplaintDescriptionList
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
const
Row
(
hint:
const
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
'Select Description'
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
items:
provider
.
complaintDescriptionDropdown
.
map
(
(
Description
)
=>
DropdownMenuItem
<
ComplaintDescriptionList
>(
value:
Description
,
child:
Text
(
child:
Text
(
Description
.
name
??
""
,
'Select
Description
'
,
style:
const
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
overflow:
TextOverflow
.
ellipsis
,
.
ellipsis
,
),
),
),
),
)
],
.
toList
(),
value:
provider
.
selectedDescriptionType
,
onChanged:
(
ComplaintDescriptionList
?
value
)
{
if
(
provider
.
complaintDescriptionDropdown
.
isNotEmpty
)
{
provider
.
selectedDescriptionType
=
value
;
provider
.
selectedDescription
=
value
?.
name
;
provider
.
selectedDescriptionId
=
value
?.
id
;
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
),
decoration:
BoxDecoration
(
items:
borderRadius:
BorderRadius
.
circular
(
provider
.
complaintDescriptionDropdown
14
),
.
map
(
color:
AppColors
.
text_field_color
,
(
Description
)
=>
DropdownMenuItem
<
ComplaintDescriptionList
>(
value:
Description
,
child:
Text
(
Description
.
name
??
""
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedDescriptionType
,
onChanged:
(
ComplaintDescriptionList
?
value
)
{
if
(
provider
.
complaintDescriptionDropdown
.
isNotEmpty
)
{
provider
.
selectedDescriptionType
=
value
;
provider
.
selectedDescription
=
value
?.
name
;
provider
.
selectedDescriptionId
=
value
?.
id
;
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
),
),
iconStyleData:
IconStyleData
(
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,),
iconSize:
12
,
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
iconDisabledColor:
Colors
.
grey
,
),
dropdownStyleData:
DropdownStyleData
(
maxHeight:
200
,
width:
350
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
),
scrollbarTheme:
ScrollbarThemeData
(
dropdownStyleData:
DropdownStyleData
(
radius:
const
Radius
.
circular
(
15
),
maxHeight:
200
,
thickness:
MaterialStateProperty
width:
350
,
.
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
,
height:
40
,
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
left:
14
,
right:
14
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Duration"
,
style:
TextStyle
(
child:
Text
(
"Duration"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
),),
),),
),
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
Container
(
padding:
height:
50
,
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
alignment:
Alignment
.
center
,
child:
TextFormField
(
decoration:
BoxDecoration
(
controller:
color:
AppColors
.
text_field_color
,
running_hrs
,
borderRadius:
keyboardType:
BorderRadius
.
circular
(
14
),
TextInputType
.
text
,
),
decoration:
InputDecoration
(
child:
Padding
(
padding:
hintText:
const
EdgeInsets
.
fromLTRB
(
"Enter Running Number"
,
10.0
,
0.0
,
10
,
0
),
hintStyle:
TextStyle
(
child:
TextFormField
(
fontWeight:
FontWeight
.
w400
,
controller:
color:
Color
(
0xFFB4BEC0
),
running_hrs
,
fontSize:
14
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Running Number"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
SizedBox
(
height:
10.0
),
SizedBox
(
height:
10.0
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"Message"
,
style:
TextStyle
(
child:
Text
(
"Message"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
),),
),),
),
Container
(
height:
150
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
Container
(
padding:
height:
150
,
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
alignment:
Alignment
.
center
,
child:
TextFormField
(
decoration:
BoxDecoration
(
maxLines:
6
,
color:
AppColors
.
text_field_color
,
controller:
borderRadius:
Complaint_Note
,
BorderRadius
.
circular
(
14
),
keyboardType:
),
TextInputType
.
text
,
child:
Padding
(
decoration:
InputDecoration
(
padding:
const
EdgeInsets
.
fromLTRB
(
hintText:
10.0
,
0.0
,
10
,
0
),
"Enter Message"
,
child:
TextFormField
(
hintStyle:
TextStyle
(
maxLines:
6
,
fontWeight:
FontWeight
.
w400
,
controller:
color:
Color
(
0xFFB4BEC0
),
Complaint_Note
,
fontSize:
14
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Message"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
65.0
),
SizedBox
(
height:
65.0
),
],
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/genTracker/ScanEnterGeneratorIDScreen.dart
View file @
d24e453e
...
@@ -52,64 +52,66 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
...
@@ -52,64 +52,66 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"
${widget.from}
"
),
appBar:
appbar
(
context
,
"
${widget.from}
"
),
body:
Container
(
body:
SafeArea
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Container
(
child:
Column
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
children:
[
child:
Column
(
Spacer
(),
children:
[
SizedBox
(
Spacer
(),
height:
250
,
SizedBox
(
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
key:
provider
.
scannerKey
,
provider
.
onQRViewCreated
(
p0
,
provider
.
title
,
context
);
onQRViewCreated:
(
p0
)
{
},
provider
.
onQRViewCreated
(
p0
,
provider
.
title
,
context
);
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
},
cameraFacing:
CameraFacing
.
back
,
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
overlay:
QrScannerOverlayShape
(
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderColor:
AppColors
.
app_blue
,
borderLength:
60
,
borderRadius:
20
,
borderWidth:
10
,
borderLength:
60
,
cutOutSize:
250.0
,
borderWidth:
10
,
cutOutSize:
250.0
,
),
),
),
),
),
),
SizedBox
(
height:
25
),
SizedBox
(
height:
25
),
Text
(
Text
(
"Scan QR"
,
"Scan QR"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
),
Text
(
Text
(
provider
.
subTitle
,
provider
.
subTitle
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
),
Spacer
(),
Spacer
(),
Text
(
Text
(
"or"
,
"or"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
InkResponse
(
onTap:
()
async
{
_showgenIdBottomSheet
(
context
);
},
child:
Text
(
"Tap to Enter Generator ID"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
color:
AppColors
.
app_blue
),
),
),
),
InkResponse
(
SizedBox
(
height:
50
),
onTap:
()
async
{
],
_showgenIdBottomSheet
(
context
);
},
child:
Text
(
"Tap to Enter Generator ID"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),
),
),
SizedBox
(
height:
50
),
],
),
),
),
),
),
),
),
...
...
lib/screens/inventory/GeneratorPartDetailsScreen.dart
View file @
d24e453e
...
@@ -57,418 +57,420 @@ class _GeneratorPartDetailsScreenState
...
@@ -57,418 +57,420 @@ class _GeneratorPartDetailsScreenState
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
appBar:
appbar
(
context
,
"Gen Inventory"
),
body:
Container
(
body:
SafeArea
(
child:
SingleChildScrollView
(
child:
Container
(
child:
Column
(
child:
SingleChildScrollView
(
children:
[
child:
Column
(
Container
(
children:
[
margin:
EdgeInsets
.
only
(
top:
15
,
bottom:
15
),
Container
(
decoration:
BoxDecoration
(
margin:
EdgeInsets
.
only
(
top:
15
,
bottom:
15
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
16
),
child:
Column
(
),
children:
[
child:
Column
(
Container
(
children:
[
padding:
EdgeInsets
.
only
(
Container
(
left:
10
,
padding:
EdgeInsets
.
only
(
right:
10
,
left:
10
,
top:
15
,
right:
10
,
),
top:
15
,
child:
Row
(
),
children:
[
child:
Row
(
Expanded
(
children:
[
child:
Text
(
Expanded
(
"
${provider.partData.prodName}
"
,
child:
Text
(
style:
TextStyle
(
"
${provider.partData.prodName}
"
,
color:
AppColors
.
app_blue
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
],
],
),
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Row
(
Container
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
padding:
EdgeInsets
.
symmetric
(
children:
[
horizontal:
10
,
Expanded
(
vertical:
15
,
child:
SizedBox
(
),
child:
Column
(
margin:
EdgeInsets
.
symmetric
(
crossAxisAlignment:
horizontal:
10
,
CrossAxisAlignment
.
center
,
vertical:
15
,
children:
[
),
RichText
(
decoration:
BoxDecoration
(
text:
TextSpan
(
color:
Color
(
0xFFE6F6FF
),
children:
[
borderRadius:
BorderRadius
.
circular
(
16
),
TextSpan
(
),
text:
child:
Row
(
"
${provider.partData.remainingQuantity}
"
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
style:
TextStyle
(
children:
[
color:
AppColors
.
app_blue
,
Expanded
(
fontSize:
30
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
"
${provider.partData.remainingQuantity}
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
30
,
),
),
),
)
,
]
,
]
,
)
,
),
),
),
Text
(
Text
(
"Remaining Quantity"
,
"Remaining Quantity"
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
],
],
),
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
15
,
),
),
child:
Row
(
Container
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
padding:
EdgeInsets
.
symmetric
(
children:
[
horizontal:
15
,
Expanded
(
vertical:
15
,
child:
InkResponse
(
),
onTap:
()
{
child:
Row
(
_showStockIssueBottomSheet
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
context
,
children:
[
"Issue"
,
Expanded
(
);
child:
InkResponse
(
},
onTap:
()
{
child:
Container
(
_showStockIssueBottomSheet
(
height:
45
,
context
,
decoration:
BoxDecoration
(
"Issue"
,
color:
Color
(
0xFFFFEFEF
),
);
border:
Border
.
all
(
},
color:
Color
(
0xFFED3424
),
child:
Container
(
width:
0.5
,
height:
45
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
12
),
color:
Color
(
0xFFFFEFEF
),
),
border:
Border
.
all
(
child:
Center
(
child:
Text
(
"- Issue"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Center
(
child:
Text
(
"- Issue"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
),
),
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
_showStockIssueBottomSheet
(
_showStockIssueBottomSheet
(
context
,
context
,
"Recieve"
,
"Recieve"
,
);
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE7FFE5
),
color:
Color
(
0xFFE7FFE5
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Center
(
child:
Text
(
"+ Recieve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
color:
Color
(
0xFF0D9C00
),
width:
0.5
,
),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Center
(
child:
Text
(
"+ Recieve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
],
],
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Text
(
"Product Details"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
alignment:
Alignment
.
topLeft
,
horizontal:
10
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
vertical:
10
,
child:
Text
(
),
"Product Details"
,
margin:
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
10
,
color:
Color
(
0xFF818181
),
vertical:
10
,
fontFamily:
"JakartaMedium"
,
),
),
decoration:
BoxDecoration
(
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
Container
(
children:
List
.
generate
(
3
,
(
index
)
{
padding:
EdgeInsets
.
symmetric
(
final
headings
=
[
horizontal:
10
,
"Product Name"
,
vertical:
10
,
"Product ID"
,
),
"Project"
,
margin:
EdgeInsets
.
symmetric
(
];
horizontal:
10
,
vertical:
10
,
final
values
=
[
),
provider
.
partData
.
prodName
,
decoration:
BoxDecoration
(
provider
.
partData
.
id
,
color:
Colors
.
white
,
provider
.
partData
.
project
,
borderRadius:
BorderRadius
.
circular
(
16
),
];
),
return
Container
(
child:
Column
(
padding:
EdgeInsets
.
symmetric
(
children:
List
.
generate
(
3
,
(
index
)
{
horizontal:
10
,
final
headings
=
[
vertical:
10
,
"Product Name"
,
),
"Product ID"
,
child:
Row
(
"Project"
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
];
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
final
values
=
[
Expanded
(
provider
.
partData
.
prodName
,
flex:
1
,
provider
.
partData
.
id
,
child:
Text
(
provider
.
partData
.
project
,
"
${headings[index]}
"
,
];
style:
TextStyle
(
return
Container
(
fontFamily:
"JakartaMedium"
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
Text
(
"
${headings[index]}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
Text
(
child:
Text
(
"
${values[index]}
"
,
"
${values[index]}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
))
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Text
(
"Vendor Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
alignment:
Alignment
.
topLeft
,
horizontal:
10
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
vertical:
10
,
child:
Text
(
),
"Vendor Details"
,
margin:
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
10
,
fontFamily:
"JakartaMedium"
,
vertical:
10
,
color:
Color
(
0xFF818181
),
),
),
decoration:
BoxDecoration
(
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
Container
(
children:
List
.
generate
(
2
,
(
index
)
{
padding:
EdgeInsets
.
symmetric
(
final
headings
=
[
"Vendor 1"
,
"Vendor 2"
];
horizontal:
10
,
vertical:
10
,
final
values
=
[
),
provider
.
partData
.
vendor1
,
margin:
EdgeInsets
.
symmetric
(
provider
.
partData
.
vendor2
,
horizontal:
10
,
];
vertical:
10
,
return
Container
(
),
padding:
EdgeInsets
.
symmetric
(
decoration:
BoxDecoration
(
horizontal:
10
,
color:
Colors
.
white
,
vertical:
10
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Row
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
2
,
(
index
)
{
mainAxisAlignment:
MainAxisAlignment
.
start
,
final
headings
=
[
"Vendor 1"
,
"Vendor 2"
];
children:
[
Expanded
(
final
values
=
[
flex:
1
,
provider
.
partData
.
vendor1
,
child:
Text
(
provider
.
partData
.
vendor2
,
"
${headings[index]}
"
,
];
style:
TextStyle
(
return
Container
(
fontFamily:
"JakartaMedium"
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
Text
(
"
${headings[index]}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
Text
(
child:
Text
(
"
${values[index]}
"
,
"
${values[index]}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
))
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Text
(
"Other Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
alignment:
Alignment
.
topLeft
,
horizontal:
10
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
vertical:
10
,
child:
Text
(
),
"Other Details"
,
margin:
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
10
,
fontFamily:
"JakartaMedium"
,
vertical:
10
,
color:
Color
(
0xFF818181
),
),
),
decoration:
BoxDecoration
(
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Column
(
Container
(
children:
List
.
generate
(
3
,
(
index
)
{
padding:
EdgeInsets
.
symmetric
(
final
headings
=
[
"Sub Group"
,
"Units"
,
"MSL"
];
horizontal:
10
,
vertical:
10
,
final
values
=
[
),
provider
.
partData
.
subGroup
,
margin:
EdgeInsets
.
symmetric
(
provider
.
partData
.
units
,
horizontal:
10
,
provider
.
partData
.
msl
,
vertical:
10
,
];
),
return
Container
(
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
color:
Colors
.
white
,
horizontal:
10
,
borderRadius:
BorderRadius
.
circular
(
16
),
vertical:
10
,
),
),
child:
Column
(
child:
Row
(
children:
List
.
generate
(
3
,
(
index
)
{
crossAxisAlignment:
CrossAxisAlignment
.
start
,
final
headings
=
[
"Sub Group"
,
"Units"
,
"MSL"
];
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
final
values
=
[
Expanded
(
provider
.
partData
.
subGroup
,
flex:
1
,
provider
.
partData
.
units
,
child:
Text
(
provider
.
partData
.
msl
,
"
${headings[index]}
"
,
];
style:
TextStyle
(
return
Container
(
fontFamily:
"JakartaMedium"
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
Text
(
"
${headings[index]}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
2
,
flex:
2
,
child:
Text
(
child:
Text
(
"
${values[index]}
"
,
"
${values[index]}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
))
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)
),
),
),
),
),
],
],
),
),
);
);
}),
}),
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Text
(
"Description"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
alignment:
Alignment
.
topLeft
,
horizontal:
10
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
vertical:
10
,
child:
Text
(
),
"Description"
,
margin:
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
10
,
fontFamily:
"JakartaMedium"
,
vertical:
10
,
color:
Color
(
0xFF818181
),
),
),
decoration:
BoxDecoration
(
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
child:
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
child:
Row
(
margin:
EdgeInsets
.
symmetric
(
children:
[
horizontal:
10
,
Expanded
(
vertical:
10
,
child:
SizedBox
(
),
child:
Column
(
decoration:
BoxDecoration
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
color:
Colors
.
white
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
borderRadius:
BorderRadius
.
circular
(
16
),
children:
[
),
Text
(
child:
Container
(
"Description"
,
padding:
EdgeInsets
.
symmetric
(
style:
TextStyle
(
horizontal:
10
,
fontFamily:
"JakartaMedium"
,
vertical:
10
,
),
child:
Row
(
children:
[
Expanded
(
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"Description"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
),
Text
(
Text
(
"
${provider.partData.prodDesc}
"
,
"
${provider.partData.prodDesc}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
SizedBox
(
height:
150
),
SizedBox
(
height:
150
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/inventory/InventoryScreen.dart
View file @
d24e453e
...
@@ -41,65 +41,67 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -41,65 +41,67 @@ class _InventoryScreenState extends State<InventoryScreen> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
appBar:
appbar
(
context
,
"Gen Inventory"
),
body:
Container
(
body:
SafeArea
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Container
(
child:
Column
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
children:
[
child:
Column
(
Spacer
(),
children:
[
Container
(
Spacer
(),
height:
250
,
Container
(
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
key:
provider
.
scannerKey
,
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
onQRViewCreated:
(
p0
)
{
},
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
},
cameraFacing:
CameraFacing
.
back
,
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderColor:
AppColors
.
app_blue
,
borderLength:
60
,
borderRadius:
20
,
borderWidth:
10
,
borderLength:
60
,
cutOutSize:
250.0
,
borderWidth:
10
,
cutOutSize:
250.0
,
),
),
),
),
),
),
SizedBox
(
height:
25
),
SizedBox
(
height:
25
),
Text
(
Text
(
"Scan QR"
,
"Scan QR"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
Text
(
"to open Inventory"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
Spacer
(),
Text
(
"or"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
InkResponse
(
onTap:
()
async
{
_showPartIdBottomSheet
(
context
);
},
child:
Text
(
"Tap To Enter Part ID"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
17
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),
),
),
),
Text
(
SizedBox
(
height:
50
),
"to open Inventory"
,
],
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
Spacer
(),
Text
(
"or"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
InkResponse
(
onTap:
()
async
{
_showPartIdBottomSheet
(
context
);
},
child:
Text
(
"Tap To Enter Part ID"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
17
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),
),
),
SizedBox
(
height:
50
),
],
),
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/AccountSuggestions.dart
View file @
d24e453e
...
@@ -27,194 +27,196 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -27,194 +27,196 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Accounts"
),
appBar:
appbar
(
context
,
"Accounts"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
child:
Container
(
child:
Column
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
children:
[
child:
Column
(
const
SizedBox
(
height:
10
),
children:
[
Container
(
const
SizedBox
(
height:
10
),
alignment:
Alignment
.
topLeft
,
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
topLeft
,
child:
Text
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
"Search Account"
,
child:
Text
(
style:
TextStyle
(
color:
Color
(
0xFF2d2d2d
)),
"Search Account"
,
),
style:
TextStyle
(
color:
Color
(
0xFF2d2d2d
)),
),
),
SizedBox
(
height:
5
),
Container
(
height:
48
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
16
),
border:
searchFocusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
:
null
,
),
),
// alignment: Alignment.center,
SizedBox
(
height:
5
),
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
Container
(
child:
Padding
(
height:
48
,
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
15
,
0
),
alignment:
Alignment
.
center
,
child:
TextField
(
decoration:
BoxDecoration
(
controller:
_searchController
,
color:
AppColors
.
text_field_color
,
keyboardType:
TextInputType
.
text
,
borderRadius:
BorderRadius
.
circular
(
16
),
focusNode:
searchFocusNode
,
border:
textCapitalization:
TextCapitalization
.
characters
,
searchFocusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
style:
TextStyle
(
fontSize:
14
),
:
null
,
onChanged:
(
value
)
{
),
if
(
value
.
length
>=
3
)
{
// alignment: Alignment.center,
provider
.
AccountSuggestionAPI
(
context
,
value
);
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
}
child:
Padding
(
},
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
15
,
0
),
onTapOutside:
(
event
)
{
child:
TextField
(
// Handle onTapOutside
controller:
_searchController
,
FocusScope
.
of
(
context
).
unfocus
();
keyboardType:
TextInputType
.
text
,
},
focusNode:
searchFocusNode
,
decoration:
InputDecoration
(
textCapitalization:
TextCapitalization
.
characters
,
isDense:
true
,
hintStyle:
TextStyle
(
style:
TextStyle
(
fontSize:
14
),
fontWeight:
FontWeight
.
w400
,
onChanged:
(
value
)
{
color:
Color
(
0xFF818181
),
if
(
value
.
length
>=
3
)
{
fontSize:
14
,
provider
.
AccountSuggestionAPI
(
context
,
value
);
}
},
onTapOutside:
(
event
)
{
// Handle onTapOutside
FocusScope
.
of
(
context
).
unfocus
();
},
decoration:
InputDecoration
(
isDense:
true
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
hintText:
'Enter Account Name'
,
),
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
hintText:
'Enter Account Name'
,
),
),
),
),
),
),
),
Container
(
Container
(
margin:
EdgeInsets
.
only
(
top:
5.0
,
left:
25.0
),
margin:
EdgeInsets
.
only
(
top:
5.0
,
left:
25.0
)
,
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
"Note: Enter Minimum 3 Characters"
,
"Note: Enter Minimum 3 Characters"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w300
)
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w300
),
),
),
),
),
Expanded
(
Expanded
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
child:
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
provider
.
accountList
!.
length
,
itemCount:
provider
.
accountList
!.
length
,
padding:
const
EdgeInsets
.
all
(
5
),
padding:
const
EdgeInsets
.
all
(
5
),
physics:
const
NeverScrollableScrollPhysics
(),
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
var
accountList
=
provider
.
accountList
;
var
accountList
=
provider
.
accountList
;
if
(
accountList
!.
length
>
0
)
{
if
(
accountList
!.
length
>
0
)
{
return
InkWell
(
return
InkWell
(
onTap:
()
{
onTap:
()
{
// if(actname == "pendingComplaints"&&status=="Open"){
// if(actname == "pendingComplaints"&&status=="Open"){
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Paymentdetails
(
(
context
)
=>
Paymentdetails
(
accountName:
"Account"
,
accountName:
"Account"
,
name:
accountList
![
index
].
accountName
,
name:
accountList
![
index
].
accountName
,
genId:
""
,
genId:
""
,
referenceID:
referenceID:
accountList
![
index
].
accountId
,
accountList
![
index
].
accountId
,
),
),
);
// }
},
child:
SizedBox
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
10
),
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
),
color:
Color
(
0xFFE6F6FF
),
);
borderRadius:
BorderRadius
.
circular
(
// }
8
,
},
child:
SizedBox
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
10
),
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
width:
30
,
height:
30
,
"assets/svg/se_block_head.svg"
,
),
),
),
child:
SvgPicture
.
asset
(
width:
30
,
height:
30
,
"assets/svg/se_block_head.svg"
,
),
),
),
),
),
SizedBox
(
width:
10
,
),
SizedBox
(
width:
10
,),
Expanded
(
Expanded
(
flex:
5
,
flex:
5
,
child:
Text
(
child:
Text
(
"
${accountList![index].accountName}
"
,
"
${accountList![index].accountName}
"
,
textAlign:
TextAlign
.
start
,
textAlign:
TextAlign
.
start
,
maxLines:
3
,
maxLines:
3
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
color:
AppColors
.
semi_black
),
),
),
),
),
),
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
"assets/svg/arrow_right_new.svg"
,
)
,
),
),
),
],
],
),
),
),
);
}
else
{
return
Expanded
(
child:
SingleChildScrollView
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
// Set width to fill parent width
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
30.0
),
topRight:
Radius
.
circular
(
30.0
),
),
),
),
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
),
);
}
else
{
return
Expanded
(
child:
SingleChildScrollView
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
child:
Container
(
child:
Align
(
width:
double
.
infinity
,
alignment:
Alignment
.
center
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Text
(
// Set width to fill parent width
"No Data Available"
,
decoration:
BoxDecoration
(
style:
TextStyle
(
borderRadius:
BorderRadius
.
only
(
fontWeight:
FontWeight
.
bold
,
topLeft:
Radius
.
circular
(
30.0
),
overflow:
TextOverflow
.
ellipsis
,
topRight:
Radius
.
circular
(
30.0
),
),
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
child:
Container
(
child:
Align
(
alignment:
Alignment
.
center
,
child:
Text
(
"No Data Available"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
),
),
),
),
),
),
),
)
,
)
;
);
}
}
}
,
}
,
)
,
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
),
),
...
...
lib/screens/serviceEngineer/Followupdetails.dart
View file @
d24e453e
...
@@ -40,89 +40,91 @@ class _FollowupdetailsState extends State<Followupdetails> {
...
@@ -40,89 +40,91 @@ class _FollowupdetailsState extends State<Followupdetails> {
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Follow Up Details"
),
appBar:
appbar
(
context
,
"Follow Up Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
SafeArea
(
child:
ListView
.
builder
(
child:
Container
(
itemCount:
provider
.
followUpList
.
length
,
child:
ListView
.
builder
(
itemBuilder:
(
context
,
index
)
{
itemCount:
provider
.
followUpList
.
length
,
return
Container
(
itemBuilder:
(
context
,
index
)
{
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
color:
Colors
.
white
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
),
color:
Colors
.
white
,
),
borderRadius:
BorderRadius
.
circular
(
20
),
child:
Column
(
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
List
.
generate
(
9
,
(
j
)
{
crossAxisAlignment:
CrossAxisAlignment
.
start
,
final
textheads
=
[
children:
List
.
generate
(
9
,
(
j
)
{
"Employee Name"
,
final
textheads
=
[
"Date"
,
"Employee Name"
,
"Type"
,
"Date"
,
"In Time"
,
"Type"
,
"Out Time"
,
"In Time"
,
"Running Hours"
,
"Out Time"
,
"FSR File"
,
"Running Hours"
,
"FSR Number"
,
"FSR File"
,
"Feedback"
,
"FSR Number"
,
];
"Feedback"
,
final
textSubheads
=
[
];
followups
[
index
].
ename
??
"-"
,
final
textSubheads
=
[
followups
[
index
].
date
??
"-"
,
followups
[
index
].
ename
??
"-"
,
followups
[
index
].
type
??
"-"
,
followups
[
index
].
date
??
"-"
,
followups
[
index
].
time
??
"-"
,
followups
[
index
].
type
??
"-"
,
followups
[
index
].
outTime
??
"-"
,
followups
[
index
].
time
??
"-"
,
followups
[
index
].
runningHrs
??
"-"
,
followups
[
index
].
outTime
??
"-"
,
followups
[
index
].
fsrExt
??
"-"
,
followups
[
index
].
runningHrs
??
"-"
,
followups
[
index
].
fsrNo
??
"-"
,
followups
[
index
].
fsrExt
??
"-"
,
followups
[
index
].
feedback
??
"-"
,
followups
[
index
].
fsrNo
??
"-"
,
];
followups
[
index
].
feedback
??
"-"
,
return
Container
(
];
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
return
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
child:
Container
(
vertical:
3
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
3
,
),
horizontal:
0
,
child:
Row
(
),
children:
[
child:
Row
(
Expanded
(
child:
Text
(
textheads
[
j
].
toString
())),
children:
[
Expanded
(
Expanded
(
child:
Text
(
textheads
[
j
].
toString
())),
child:
InkResponse
(
Expanded
(
onTap:
()
{
child:
InkResponse
(
if
(
textheads
[
j
]
==
"FSR File"
)
{
onTap:
()
{
Navigator
.
push
(
if
(
textheads
[
j
]
==
"FSR File"
)
{
context
,
Navigator
.
push
(
MaterialPageRoute
(
context
,
builder:
MaterialPageRoute
(
(
context
)
=>
Fileviewer
(
builder:
fileName:
followups
[
index
].
fsrExt
!,
(
context
)
=>
Fileviewer
(
fileUrl:
"https://erp.gengroup.in/files_genservices/tech_fsr_report/
${followups[index].fsrExt!}
"
,
fileName:
followups
[
index
].
fsrExt
!,
),
fileUrl:
"https://erp.gengroup.in/files_genservices/tech_fsr_report/
${followups[index].fsrExt!}
"
,
),
),
);
),
}
);
},
}
child:
Text
(
},
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
child:
Text
(
maxLines:
2
,
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
overflow:
TextOverflow
.
ellipsis
,
maxLines:
2
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
color:
style:
TextStyle
(
textheads
[
j
]
==
"FSR File"
color:
?
AppColors
.
app_blue
textheads
[
j
]
==
"FSR File"
:
Color
(
0xFF818181
),
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
),
),
),
),
),
),
)
,
]
,
]
,
)
,
),
),
)
,
)
;
);
}),
}
),
),
)
,
)
;
);
},
}
,
)
,
),
),
),
),
),
),
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment