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
cdad3e17
Commit
cdad3e17
authored
Jun 09, 2025
by
Sai Srinivas
Browse files
09-06-2025 By Sai Srinivas
issues and Alignments and modifications
parent
60c0bef0
Changes
59
Hide whitespace changes
Inline
Side-by-side
lib/screens/WebERPScreen.dart
View file @
cdad3e17
...
...
@@ -9,10 +9,8 @@ import 'package:flutter/material.dart';
import
'package:flutter_download_manager/flutter_download_manager.dart'
;
import
'package:flutter_downloader/flutter_downloader.dart'
;
import
'package:flutter_inappwebview/flutter_inappwebview.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/services/api_calling.dart'
;
import
'package:path_provider/path_provider.dart'
;
import
'package:permission_handler/permission_handler.dart'
;
import
'dart:math'
;
...
...
@@ -20,9 +18,9 @@ import 'dart:math';
import
'package:flutter/widgets.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
const
MAX_PROGRESS
=
100
;
//
const MAX_PROGRESS = 100;
Future
main
(
)
async
{
Future
runErpScreenApp
(
)
async
{
await
FlutterDownloader
.
initialize
(
debug:
true
,
// optional: set false to disable printing logs to console
);
...
...
@@ -161,6 +159,11 @@ class _WebErpScreenState extends State<WebErpScreen> {
thirdPartyCookiesEnabled:
true
,
blockNetworkImage:
false
,
supportMultipleWindows:
true
,
blockNetworkLoads:
false
,
networkAvailable:
true
,
useShouldInterceptRequest:
true
,
hardwareAcceleration:
true
// Enable camera access
),
...
...
@@ -255,8 +258,28 @@ class _WebErpScreenState extends State<WebErpScreen> {
allowsLinkPreview:
true
,
databaseEnabled:
true
,
// Enables the WebView database
clearSessionCache:
true
,
mediaType:
"image/*"
,
mediaType:
"image/*,application/pdf"
,
useShouldInterceptRequest:
true
,
hardwareAcceleration:
true
),
shouldInterceptRequest:
(
controller
,
request
)
async
{
final
url
=
request
.
url
.
toString
();
print
(
'Intercepting request:
$url
, Headers:
${request.headers}
'
);
if
(
url
.
endsWith
(
'.pdf'
))
{
final
response
=
await
http
.
get
(
Uri
.
parse
(
url
),
headers:
{
'Accept'
:
'application/pdf'
,
});
if
(
response
.
statusCode
==
200
&&
response
.
headers
[
'content-type'
]?.
contains
(
'application/pdf'
)
==
true
)
{
return
WebResourceResponse
(
contentType:
'application/pdf'
,
data:
response
.
bodyBytes
,
);
}
else
{
print
(
'Failed to load PDF: Status
${response.statusCode}
, Content-Type:
${response.headers['content-type']}
'
);
}
}
return
null
;
},
shouldOverrideUrlLoading:
(
controller
,
navigationAction
,
...
...
@@ -265,6 +288,14 @@ class _WebErpScreenState extends State<WebErpScreen> {
print
(
"urib scgefes"
);
print
(
uri
);
print
(
uri
.
scheme
);
if
(
uri
.
toString
().
contains
(
'file_viewer_n ame.php'
)
&&
uri
.
toString
().
contains
(
'.pdf'
))
{
final
pdfPath
=
Uri
.
parse
(
uri
.
toString
()).
queryParameters
[
'file_path'
];
if
(
pdfPath
!=
null
)
{
final
pdfUrl
=
'https://erp.gengroup.in/
$pdfPath
'
;
await
controller
.
loadUrl
(
urlRequest:
URLRequest
(
url:
WebUri
(
pdfUrl
)));
return
NavigationActionPolicy
.
CANCEL
;
}
}
if
(
uri
.
scheme
==
"tel"
)
{
// Launch the phone dialer app with the specified phone number
if
(
await
canLaunch
(
uri
.
toString
()))
{
...
...
@@ -297,7 +328,37 @@ class _WebErpScreenState extends State<WebErpScreen> {
return
NavigationActionPolicy
.
ALLOW
;
},
onLoadStop:
(
controller
,
url
)
{
onLoadStop:
(
controller
,
url
)
async
{
if
(
url
.
toString
().
contains
(
'file_viewer_name.php'
)
&&
url
.
toString
().
contains
(
'.pdf'
))
{
final
uri
=
Uri
.
parse
(
url
.
toString
());
final
pdfPath
=
uri
.
queryParameters
[
'file_path'
];
if
(
pdfPath
!=
null
)
{
final
pdfUrl
=
'https://erp.gengroup.in/
$pdfPath
'
;
await
controller
.
evaluateJavascript
(
source
:
'''
var pdfjsLib = window.pdfjsLib || document.createElement('
script
');
pdfjsLib.src = '
https:
//mozilla.github.io/pdf.js/build/pdf.js';
document
.
head
.
appendChild
(
pdfjsLib
);
pdfjsLib
.
onload
=
function
()
{
pdfjsLib
.
getDocument
(
'
$pdfUrl
'
).
promise
.
then
(
function
(
pdf
)
{
pdf
.
getPage
(
1
).
then
(
function
(
page
)
{
var
canvas
=
document
.
createElement
(
'canvas'
);
document
.
body
.
appendChild
(
canvas
);
var
context
=
canvas
.
getContext
(
'2d'
);
var
viewport
=
page
.
getViewport
({
scale:
1.0
});
canvas
.
height
=
viewport
.
height
;
canvas
.
width
=
viewport
.
width
;
page
.
render
({
canvasContext:
context
,
viewport:
viewport
});
});
}).
catch
(
function
(
error
)
{
console
.
error
(
'PDF.js error: '
+
error
);
});
};
''');
}
}
pullToRefreshController?.endRefreshing();
return setState(() {
isLoading = false;
...
...
lib/screens/WebWhizzdomScreen.dart
View file @
cdad3e17
...
...
@@ -11,9 +11,9 @@ import 'package:permission_handler/permission_handler.dart';
import
'WebERPScreen.dart'
;
const
MAX_PROGRESS
=
100
;
//
const MAX_PROGRESS = 100;
Future
main
(
)
async
{
Future
runErpScreenApp2
(
)
async
{
await
FlutterDownloader
.
initialize
(
debug:
true
// optional: set false to disable printing logs to console
);
...
...
lib/screens/commom/accountLedger.dart
View file @
cdad3e17
...
...
@@ -194,230 +194,235 @@ class _AccountledgerState extends State<Accountledger> {
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
"
${provider.selectedAcVal??""}
"
+
" "
+
"Account Ledger List"
),
),
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
groupedData
.
keys
.
length
,
itemBuilder:
(
context
,
index
)
{
String
date
=
groupedData
.
keys
.
elementAt
(
index
);
List
<
LedgerList
>
items
=
groupedData
[
date
]!;
if
(
provider
.
ledgerList
.
isEmpty
)
{
return
Center
(
child:
Text
(
"No Data Available"
));
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
bottom:
5
),
child:
Text
(
date
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
if
(
provider
.
ledgerList
.
isEmpty
)...[
Emptywidget
(
context
),
]
else
...[
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
groupedData
.
keys
.
length
,
itemBuilder:
(
context
,
index
)
{
String
date
=
groupedData
.
keys
.
elementAt
(
index
);
List
<
LedgerList
>
items
=
groupedData
[
date
]!;
if
(
provider
.
ledgerList
.
isEmpty
)
{
return
Center
(
child:
Text
(
"No Data Available"
));
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
bottom:
5
),
child:
Text
(
date
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
),
),
...
items
.
map
((
item
)
{
...
items
.
map
((
item
)
{
double
running_balance
=
0
;
int
currentIndex
=
provider
.
ledgerList
.
indexOf
(
item
,
);
for
(
var
i
=
0
;
i
<=
currentIndex
;
i
++)
{
var
ledgerItem
=
provider
.
ledgerList
[
i
];
double
credit
=
double
.
tryParse
(
ledgerItem
.
creditAmount
.
toString
(),
)
??
0
;
double
debit
=
double
.
tryParse
(
ledgerItem
.
debitAmount
.
toString
(),
)
??
0
;
running_balance
+=
(
debit
-
credit
);
}
double
running_balance
=
0
;
int
currentIndex
=
provider
.
ledgerList
.
indexOf
(
item
,
);
for
(
var
i
=
0
;
i
<=
currentIndex
;
i
++)
{
var
ledgerItem
=
provider
.
ledgerList
[
i
];
double
credit
=
double
.
tryParse
(
ledgerItem
.
creditAmount
.
toString
(),
)
??
0
;
double
debit
=
double
.
tryParse
(
ledgerItem
.
debitAmount
.
toString
(),
)
??
0
;
running_balance
+=
(
debit
-
credit
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
child:
item
.
type
==
"Credit"
?
Image
.
asset
(
"assets/images/trans_debit.png"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
)
:
Image
.
asset
(
"assets/images/trans_credit.png"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
item
.
description
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
12
,
),
),
],
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
child:
item
.
type
==
"Credit"
?
Image
.
asset
(
"assets/images/trans_debit.png"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
)
:
Image
.
asset
(
"assets/images/trans_credit.png"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
),
),
),
),
Spacer
(),
Expanded
(
flex:
3
,
child:
SizedBox
(
child:
RichText
(
textAlign:
TextAlign
.
right
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
text:
TextSpan
(
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextSpan
(
text:
item
.
type
==
"Credit"
?
"-"
:
"+"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
,
),
fontSize:
13
,
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
"₹
${item.type == "Credit" ? "${item.creditAmount}
"
:
"
${item.debitAmount}
"
}
",
Text
(
item
.
description
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color: Color(
0xFF2D2D2D,
),
fontSize: 13,
fontFamily:
"
JakartaMedium
",
"JakartaMedium"
,
fontSize:
12
,
),
),
],
),
),
),
),
],
),
Divider(
thickness: 0.5,
color: Color(0xFFd7d7d7),
),
Row(
children: [
Expanded(
child: Text(
"
Balance
",
style: TextStyle(
fontSize: 13,
color: Color(0xFF2d2d2d),
),
),
),
Expanded(
child: Text(
textAlign: TextAlign.right,
"
$
{
running_balance
.
toString
()}
" ??
"
-
",
style: TextStyle(
color: Color(0xFF818181),
fontSize: 13,
Spacer
(),
Expanded
(
flex:
3
,
child:
SizedBox
(
child:
RichText
(
textAlign:
TextAlign
.
right
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
text:
TextSpan
(
children:
[
TextSpan
(
text:
item
.
type
==
"Credit"
?
"-"
:
"+"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
,
),
fontSize:
13
,
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
"₹
${item.type == "Credit" ? "${item.creditAmount}
"
:
"
${item.debitAmount}
"
}
",
style: TextStyle(
color: Color(
0xFF2D2D2D,
),
fontSize: 13,
fontFamily:
"
JakartaMedium
",
),
),
],
),
),
),
),
),
],
),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Transactiondetails(
paymentID: item.refId,
type: item.type,
],
),
Divider(
thickness: 0.5,
color: Color(0xFFd7d7d7),
),
Row(
children: [
Expanded(
child: Text(
"
Balance
",
style: TextStyle(
fontSize: 13,
color: Color(0xFF2d2d2d),
),
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"
View
Details
",
Expanded(
child: Text(
textAlign: TextAlign.right,
"
$
{
running_balance
.
toString
()}
" ??
"
-
",
style: TextStyle(
fontFamily: "
JakartaMedium
",
fontSize: 14,
color: AppColors.app_blue,
color: Color(0xFF818181),
fontSize: 13,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"
assets
/
svg
/
next_button
.
svg
",
),
],
),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Transactiondetails(
paymentID: item.refId,
type: item.type,
),
),
],
);
},
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
",
),
],
),
),
),
),
],
),
);
}).toList(),
],
),
);
},
),
],
),
);
}).toList(),
],
),
);
},
),
],
],
),
),
...
...
@@ -540,8 +545,8 @@ class _AccountledgerState extends State<Accountledger> {
color: AppColors.text_field_color,
),
),
iconStyleData:
const
IconStyleData(
icon:
Icon(Icons.keyboard_arrow_down
),
iconStyleData: IconStyleData(
icon:
SvgPicture.asset("
assets
/
svg
/
arrow_dropdown
.
svg
",height: 25,width: 20,
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
...
...
lib/screens/commom/accountsList.dart
View file @
cdad3e17
...
...
@@ -52,7 +52,7 @@ class _AccountslistState extends State<Accountslist> {
),
),),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
accountList
.
isNotEmpty
?
Container
(
child:
SingleChildScrollView
(
controller:
scrollController
,
child:
Column
(
...
...
@@ -231,7 +231,7 @@ class _AccountslistState extends State<Accountslist> {
],
),
),
),
):
Emptywidget
(
context
),
),
onWillPop:
()
{
provider
.
pageNum
=
1
;
...
...
lib/screens/commom/addCommonPayment.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/accountsListProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
...
...
@@ -109,8 +110,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down_sharp
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
14
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -227,8 +228,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -318,8 +319,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -405,8 +406,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
lib/screens/commom/commonDashboard.dart
View file @
cdad3e17
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/commonPagesProvider.dart'
;
import
'package:generp/screens/commom/accountLedger.dart'
;
import
'package:generp/screens/commom/accountsList.dart'
;
import
'package:generp/screens/commom/addCommonPayment.dart'
;
import
'package:generp/screens/screensExports.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Utils/app_colors.dart'
;
...
...
lib/screens/commonDateRangeFilter.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -101,7 +100,6 @@ class Commondaterangefilter {
day
,
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
grey
[
700
],
),
),
...
...
@@ -155,7 +153,7 @@ class Commondaterangefilter {
});
},
child:
Container
(
margin:
EdgeInsets
.
all
(
2
),
margin:
EdgeInsets
.
all
(
1
),
decoration:
BoxDecoration
(
color:
isSelected
?
Colors
.
blue
[
600
]
...
...
@@ -241,7 +239,7 @@ class Commondaterangefilter {
height:
280
,
child:
GridView
.
count
(
crossAxisCount:
7
,
childAspectRatio:
1
,
childAspectRatio:
1
.2
,
children:
dayWidgets
,
physics:
NeverScrollableScrollPhysics
(),
),
...
...
@@ -435,7 +433,7 @@ class MyWidget extends StatelessWidget {
print
(
"Bottom sheet closed without selection"
);
}
},
child:
Icon
(
CupertinoIcons
.
color_filter
),
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
),
),
),
);
...
...
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
cdad3e17
...
...
@@ -107,258 +107,257 @@ class _AllpaymentrequesitionlistsbymodesState
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
requestLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
:
requestLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
requestLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.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
].
status
!,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
color:
AppColors
.
semi_black
,
),
),
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
Text
(
"₹"
"
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
app_blue
,
),
),
),
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
,
),
),
],
),
),
),
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
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
]
.
id
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
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
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
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
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
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
),
),
);
},
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
cdad3e17
...
...
@@ -5,6 +5,7 @@ import 'package:generp/Notifiers/financeProvider/RequesitionLidtDetailsProvider.
import
'package:generp/Notifiers/financeProvider/approveRejectPaymentRequestResponse.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/commom/accountsListDetails.dart'
;
import
'package:provider/provider.dart'
;
import
'FileViewer.dart'
;
...
...
@@ -28,14 +29,11 @@ class Paymentrequestionlistdetails extends StatefulWidget {
class
_PaymentrequestionlistdetailsState
extends
State
<
Paymentrequestionlistdetails
>
{
TextEditingController
approvedAmount
=
TextEditingController
();
TextEditingController
remarks
=
TextEditingController
();
TextEditingController
paymentReferenceNumber
=
TextEditingController
();
FocusNode
requestNode
=
FocusNode
();
FocusNode
approveNode
=
FocusNode
();
FocusNode
remarkNode
=
FocusNode
();
...
...
@@ -86,8 +84,7 @@ class _PaymentrequestionlistdetailsState
req_det
.
createdDatetime
??
"-"
,
req_det
.
updatedDatetime
??
"-"
,
];
},);
});
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
...
...
@@ -159,7 +156,7 @@ class _PaymentrequestionlistdetailsState
),
child:
Center
(
child:
Text
(
req_det
.
status
??
"-"
,
req_det
.
status
??
"-"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -207,24 +204,47 @@ class _PaymentrequestionlistdetailsState
),
),
);
}
else
if
(
provider
.
Headings
[
j
]
==
"Requested Account"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
provider
.
requestsDetails
.
accountId
,
),
),
);
}
},
child:
Text
(
provider
.
Headings
[
j
]
==
"Attachment"
[
"Attachment"
,
].
contains
(
provider
.
Headings
[
j
])
?
"View"
:
"
${provider.subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
provider
.
Headings
[
j
]
==
"Attachment"
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"Attachment"
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"Attachment"
[
"Attachment"
,
"Requested Account"
,
].
contains
(
provider
.
Headings
[
j
])
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
...
...
@@ -374,7 +394,6 @@ class _PaymentrequestionlistdetailsState
return
SafeArea
(
child:
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
@@ -478,8 +497,8 @@ class _PaymentrequestionlistdetailsState
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -672,7 +691,6 @@ class _PaymentrequestionlistdetailsState
return
SafeArea
(
child:
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
@@ -766,8 +784,8 @@ class _PaymentrequestionlistdetailsState
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -844,7 +862,28 @@ class _PaymentrequestionlistdetailsState
),
),
),
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
,))
],
),
)
],
textControllerReadonlyWidget
(
context
,
provider
.
accountName
,
...
...
@@ -887,32 +926,32 @@ class _PaymentrequestionlistdetailsState
context
,
provider
.
bankHolderName
,
"Bank Account Holder Name"
,
(
p0
)
{},
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankAccountNumber
,
"Bank Account Number"
,
(
p0
)
{},
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankName
,
"Bank Name"
,
(
p0
)
{},
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankBranchName
,
"Bank Branch Name"
,
(
p0
)
{},
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
provider
.
bankIfscCode
,
"Bank IFSC Code"
,
(
p0
)
{},
(
p0
)
{},
),
textControllerReadonlyWidget
(
context
,
...
...
@@ -921,16 +960,17 @@ class _PaymentrequestionlistdetailsState
(
p0
)
{},
),
InkWell
(
onTap:
()
{
provider
.
paymentrequisitionProcessSubmitAPIFunction
(
context
,
widget
.
mode
,
provider
.
paymentsReqDetails
.
id
,
paymentReferenceNumber
.
text
,
remarks
.
text
,
provider
.
imagePath
);
provider
.
paymentrequisitionProcessSubmitAPIFunction
(
context
,
widget
.
mode
,
provider
.
paymentsReqDetails
.
id
,
paymentReferenceNumber
.
text
,
remarks
.
text
,
provider
.
imagePath
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
...
...
@@ -1076,7 +1116,10 @@ class _PaymentrequestionlistdetailsState
child:
Text
(
hintText
),
),
Container
(
height:
hintText
==
"Enter Description"
||
hintText
==
"Enter Remarks"
?
150
:
50
,
height:
hintText
==
"Enter Description"
||
hintText
==
"Enter Remarks"
?
150
:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
...
...
@@ -1087,7 +1130,10 @@ class _PaymentrequestionlistdetailsState
child:
TextFormField
(
controller:
controller
,
keyboardType:
TextInputType
.
text
,
maxLines:
hintText
==
"Enter Description"
||
hintText
==
"Enter Remarks"
?
60
:
1
,
maxLines:
hintText
==
"Enter Description"
||
hintText
==
"Enter Remarks"
?
60
:
1
,
onChanged:
onChanged
,
decoration:
InputDecoration
(
hintText:
hintText
,
...
...
@@ -1106,7 +1152,7 @@ class _PaymentrequestionlistdetailsState
],
);
}
Widget
textControllerReadonlyWidget
(
context
,
controller
,
...
...
@@ -1135,12 +1181,8 @@ class _PaymentrequestionlistdetailsState
keyboardType:
TextInputType
.
text
,
maxLines:
hintText
==
"Enter Description"
?
60
:
1
,
onChanged:
onChanged
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
decoration:
InputDecoration
(
hintText:
hintText
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
...
...
lib/screens/finance/addPaymentReceiptList.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Models/financeModels/addReceiptPaymentResponse.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -116,8 +117,8 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -211,8 +212,8 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -361,8 +362,8 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -485,6 +486,28 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
),
),
),
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
,))
],
),
)
],
],
),
),
...
...
lib/screens/finance/directPaymentRequesitionList.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:generp/Notifiers/financeProvider/RequestionListProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:intl/intl.dart'
;
import
'package:provider/provider.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/financeProvider/RequestionListProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:intl/intl.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Models/financeModels/addDirectPaymentResponse.dart'
;
import
'../../Models/financeModels/addDirectPaymentResponse.dart'
;
class
Directpaymentrequesitionlist
extends
StatefulWidget
{
final
String
pageTitleName
;
class
Directpaymentrequesitionlist
extends
StatefulWidget
{
final
String
pageTitleName
;
const
Directpaymentrequesitionlist
({
super
.
key
,
required
this
.
pageTitleName
});
const
Directpaymentrequesitionlist
({
super
.
key
,
required
this
.
pageTitleName
});
@override
State
<
Directpaymentrequesitionlist
>
createState
()
=>
_DirectpaymentrequesitionlistState
();
}
@override
State
<
Directpaymentrequesitionlist
>
createState
()
=>
_DirectpaymentrequesitionlistState
();
}
class
_DirectpaymentrequesitionlistState
extends
State
<
Directpaymentrequesitionlist
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
listen:
false
,
);
provider
.
addDirectPaymentRequestionViewAPI
(
context
);
});
}
class
_DirectpaymentrequesitionlistState
extends
State
<
Directpaymentrequesitionlist
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
listen:
false
,
);
provider
.
addDirectPaymentRequestionViewAPI
(
context
);
});
}
@override
void
dispose
()
{
super
.
dispose
();
}
@override
void
dispose
()
{
super
.
dispose
();
}
Future
<
bool
>
_onBackPressed
(
BuildContext
context
)
async
{
Navigator
.
pop
(
context
,
true
);
return
true
;
}
Future
<
bool
>
_onBackPressed
(
BuildContext
context
)
async
{
Navigator
.
pop
(
context
,
true
);
return
true
;
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Account"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
DirectAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
directAccounts
.
map
(
(
accs
)
=>
DropdownMenuItem
<
DirectAccounts
>(
value:
accs
,
child:
Text
(
accs
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar
(
context
,
"
${widget.pageTitleName}
"
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Account"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
DirectAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
directAccounts
.
map
(
(
accs
)
=>
DropdownMenuItem
<
DirectAccounts
>(
value:
accs
,
child:
Text
(
accs
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
)
.
toList
(),
value:
provider
.
selectDirectAccounts
,
onChanged:
(
DirectAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directAccounts
.
isNotEmpty
)
{
provider
.
selectD
irectAccounts
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
directAccountId
=
value
.
id
!
;
provider
.
directAccount
Value
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
directAccountId
.
toString
(),
);
}
),
)
.
toList
()
,
value:
provider
.
select
DirectAccounts
,
onChanged:
(
DirectAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
d
irectAccounts
.
isNotEmpty
)
{
provider
.
selectDirectAccounts
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
)
;
provider
.
directAccount
Id
=
value
.
id
!;
provider
.
directAccountValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
directAccountId
.
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
,
),
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
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
),
),
),
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
,
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
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
.
selectDirectAccountError
),
TextWidget
(
context
,
"Payment Account"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
DirectPaymentAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
directPaymentAccounts
.
map
(
(
accs
)
=>
DropdownMenuItem
<
DirectPaymentAccounts
>(
value:
accs
,
child:
Text
(
accs
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
ErrorWidget
(
context
,
provider
.
selectDirectAccountError
),
TextWidget
(
context
,
"Payment Account"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
DirectPaymentAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account Type'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
directPaymentAccounts
.
map
(
(
accs
)
=>
DropdownMenuItem
<
DirectPaymentAccounts
>(
value:
accs
,
child:
Text
(
accs
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
)
.
toList
(),
value:
provider
.
selectDirectPaymentAccounts
,
onChanged:
(
DirectPaymentAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directPaymentAccounts
.
isNotEmpty
)
{
provider
.
selectDirectPaymentAccounts
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
directPaymentAccountsID
=
value
.
id
!;
provider
.
directPaymentAccountsValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
directPaymentAccountsID
.
toString
(),
);
}
)
,
)
.
toList
()
,
value:
provider
.
select
DirectPaymentAccounts
,
onChanged:
(
DirectPaymentAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directPaymentAccounts
.
isNotEmpty
)
{
provider
.
selectDirectPaymentAccounts
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
directPaymentAccountsID
=
value
.
id
!;
provider
.
directPaymentAccountsValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
directPaymentAccountsID
.
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
,
),
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
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
),
),
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
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
.
selectDirectPaymentAccountError
),
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter Amount"
,
provider
.
updateAmount
,
),
],
),
),
ErrorWidget
(
context
,
provider
.
selectDirectPaymentAccountError
,
),
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter Amount"
,
provider
.
updateAmount
,
),
ErrorWidget
(
context
,
provider
.
amountError
),
///payment date toBE
TextWidget
(
context
,
"Enter Date"
),
GestureDetector
(
onTap:
()
{
provider
.
showDatePickerDialog
(
context
);
},
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
child:
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
///payment date toBE
TextWidget
(
context
,
"Enter Date"
),
GestureDetector
(
onTap:
()
{
provider
.
showDatePickerDialog
(
context
);
},
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
child:
Container
(
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
provider
.
dateController
,
keyboardType:
TextInputType
.
text
,
enabled:
false
,
maxLines:
1
,
readOnly:
true
,
onChanged:
(
value
)
{
},
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
child:
TextFormField
(
controller:
provider
.
dateController
,
keyboardType:
TextInputType
.
text
,
enabled:
false
,
maxLines:
1
,
readOnly:
true
,
onChanged:
(
value
)
{},
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
disabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
]
,
)
,
)
,
]
,
),
ErrorWidget
(
context
,
provider
.
dateError
),
TextWidget
(
context
,
"Select Payment Mode"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
DirectPaymentModes
>(
isExpanded:
true
,
hint:
Text
(
'Select Payment mode'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
directPaymentModes
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
DirectPaymentModes
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
ErrorWidget
(
context
,
provider
.
dateError
),
TextWidget
(
context
,
"Select Payment Mode"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
DirectPaymentModes
>(
isExpanded:
true
,
hint:
Text
(
'Select Payment mode'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
directPaymentModes
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
DirectPaymentModes
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
)
.
toList
(),
value:
provider
.
selectDirectPaymentModes
,
onChanged:
(
DirectPaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directPaymentModes
.
isNotEmpty
)
{
provider
.
selectD
irectPaymentModes
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
directPaymentModesID
=
value
.
id
!
;
provider
.
directPaymentModes
Values
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
directPaymentModesID
.
toString
(),
);
}
)
,
)
.
toList
()
,
value:
provider
.
select
DirectPaymentModes
,
onChanged:
(
DirectPaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
d
irectPaymentModes
.
isNotEmpty
)
{
provider
.
selectDirectPaymentModes
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
)
;
provider
.
directPaymentModes
ID
=
value
.
id
!;
provider
.
directPaymentModesValues
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
directPaymentModesID
.
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
,
),
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
padding:
const
EdgeInsets
.
only
(
left:
14
,
right:
14
,
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
AppColors
.
text_field_color
,
),
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
),
),
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
menuItemStyleData:
const
MenuItemStyleData
(
height:
40
,
padding:
EdgeInsets
.
only
(
left:
14
,
right:
14
),
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
.
selectDirectPaymentError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
directPaymentModesValues
))
...
[
textControllerWidget
(
context
,
provider
.
bankNameController
,
"Enter Bank Name"
,
provider
.
updateBankName
,
),
ErrorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
context
,
provider
.
bankBranchController
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
),
ErrorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
),
ErrorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
),
ErrorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
context
,
provider
.
bankAcHolderController
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
),
ErrorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
directPaymentModesValues
==
"UPI"
)
...
[
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter UPI ID"
,
provider
.
updateUPI
,
),
ErrorWidget
(
context
,
provider
.
UPIError
),
],
),
ErrorWidget
(
context
,
provider
.
selectDirectPaymentError
),
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
directPaymentModesValues
))
...[
textControllerWidget
(
context
,
provider
.
paymentReferenc
eController
,
"Enter
Payment Reference Number
"
,
provider
.
update
Referenc
e
,
provider
.
bankNam
eController
,
"Enter
Bank Name
"
,
provider
.
update
BankNam
e
,
),
ErrorWidget
(
context
,
provider
.
paymentreferencee
rror
),
ErrorWidget
(
context
,
provider
.
bankNameE
rror
),
textControllerWidget
(
context
,
provider
.
desc
Controller
,
"Enter
Description
"
,
provider
.
update
Description
,
provider
.
bankBranch
Controller
,
"Enter
Bank Branch
"
,
provider
.
update
BankBranch
,
),
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
,
),
ErrorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
context
,
provider
.
bankAccNumberController
,
"Enter Account Number"
,
provider
.
updateNumber
,
),
ErrorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
context
,
provider
.
bankIfscController
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
),
ErrorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
context
,
provider
.
bankAcHolderController
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
),
ErrorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
directPaymentModesValues
==
"UPI"
)
...[
textControllerWidget
(
context
,
provider
.
amountController
,
"Enter UPI ID"
,
provider
.
updateUPI
,
),
ErrorWidget
(
context
,
provider
.
UPIError
),
],
textControllerWidget
(
context
,
provider
.
paymentReferenceController
,
"Enter Payment Reference Number"
,
provider
.
updateReference
,
),
ErrorWidget
(
context
,
provider
.
paymentreferenceerror
),
textControllerWidget
(
context
,
provider
.
descController
,
"Enter Description"
,
provider
.
updateDescription
,
),
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
,
)
,
),
child:
Center
(
child:
Text
(
"File Attachment"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
],
),
)
],
)
,
]
,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
onTap:
()
{
// provider.submitClicked = true;
provider
.
addDirectPaymentRequestionSubmitAPI
(
context
,
provider
.
formattedDate
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
onTap:
()
{
// provider.submitClicked = true;
provider
.
addDirectPaymentRequestionSubmitAPI
(
context
,
provider
.
formattedDate
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
onWillPop:
()
{
provider
.
resetForm
();
return
onBackPressed
(
context
);
},
);
},
);
}
void
_showDialog
(
Widget
child
)
{
showCupertinoModalPopup
<
void
>(
context:
context
,
builder:
(
BuildContext
context
)
=>
Container
(
height:
216
,
padding:
const
EdgeInsets
.
only
(
top:
6.0
),
// The Bottom margin is provided to align the popup above the system
// navigation bar.
margin:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
// Provide a background color for the popup.
color:
CupertinoColors
.
systemBackground
.
resolveFrom
(
context
),
// Use a SafeArea widget to avoid system overlaps.
child:
SafeArea
(
top:
false
,
child:
Column
(
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
height:
40
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
// Add a Cancel button (optional)
CupertinoButton
(
child:
Text
(
'Cancel'
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
onWillPop:
()
{
provider
.
resetForm
();
return
onBackPressed
(
context
);
},
);
},
);
}
void
_showDialog
(
Widget
child
)
{
showCupertinoModalPopup
<
void
>(
context:
context
,
builder:
(
BuildContext
context
)
=>
Container
(
height:
216
,
padding:
const
EdgeInsets
.
only
(
top:
6.0
),
// The Bottom margin is provided to align the popup above the system
// navigation bar.
margin:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
// Provide a background color for the popup.
color:
CupertinoColors
.
systemBackground
.
resolveFrom
(
context
),
// Use a SafeArea widget to avoid system overlaps.
child:
SafeArea
(
top:
false
,
child:
Column
(
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
height:
40
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
// Add a Cancel button (optional)
CupertinoButton
(
child:
Text
(
'Cancel'
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
onPressed:
()
{
Navigator
.
pop
(
context
);
},
),
onPressed:
()
{
Navigator
.
pop
(
context
);
},
),
// Add a Done button
CupertinoButton
(
child:
Text
(
'Done'
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
)),
onPressed:
()
{
Navigator
.
pop
(
context
);
// Dismiss the dialog
},
),
],
// Add a Done button
CupertinoButton
(
child:
Text
(
'Done'
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
onPressed:
()
{
Navigator
.
pop
(
context
);
// Dismiss the dialog
},
),
],
),
),
),
),
Expanded
(
flex:
3
,
child:
child
)
,
]
,
Expanded
(
flex:
3
,
child:
child
),
]
,
)
,
),
),
),
);
}
Widget
TextWidget
(
context
,
text
)
{
return
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
text
),
);
}
);
}
Widget
Error
Widget
(
context
,
text
)
{
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
return
SizedBox
(
height:
10
);
}
Widget
Text
Widget
(
context
,
text
)
{
return
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
text
),
);
}
Widget
textControllerWidget
(
context
,
controller
,
hintText
,
Function
(
String
)?
onChanged
,
)
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
hintText
),
),
Container
(
height:
hintText
==
"Enter Description"
?
150
:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
controller
,
keyboardType:
TextInputType
.
text
,
maxLines:
hintText
==
"Enter Description"
?
60
:
1
,
onChanged:
onChanged
,
decoration:
InputDecoration
(
hintText:
hintText
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
return
SizedBox
(
height:
10
);
}
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
Widget
textControllerWidget
(
context
,
controller
,
hintText
,
Function
(
String
)?
onChanged
,
)
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
hintText
),
),
Container
(
height:
hintText
==
"Enter Description"
?
150
:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
controller
,
keyboardType:
TextInputType
.
text
,
maxLines:
hintText
==
"Enter Description"
?
60
:
1
,
onChanged:
onChanged
,
decoration:
InputDecoration
(
hintText:
hintText
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
],
);
}
),
],
);
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Padding
(
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
,
).
viewInsets
.
bottom
,
// This handles keyboard
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Padding
(
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
,
).
viewInsets
.
bottom
,
// This handles keyboard
),
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
),
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Align
(
alignment:
Alignment
.
center
,
child:
Text
(
"Select Source"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakrtaMedium"
,
fontSize:
16
,
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Align
(
alignment:
Alignment
.
center
,
child:
Text
(
"Select Source"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakrtaMedium"
,
fontSize:
16
,
),
),
SizedBox
(
height:
15
),
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
(
context
);
},
child:
Container
(
height:
35
,
child:
Text
(
"Select photo from gallery"
)
,
),
),
SizedBox
(
height:
15
),
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
(
context
);
},
child:
Container
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
SizedBox
(
height:
10
),
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
context
);
},
child:
Container
(
height:
35
,
child:
Text
(
"Capture photo from camera"
)
,
),
),
SizedBox
(
height:
10
),
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
context
);
},
child:
Container
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
]
,
)
,
)
,
]
,
),
),
)
;
},
)
,
)
;
},
);
},
);
}
)
,
);
}
,
)
,
);
},
);
},
);
}
}
lib/screens/finance/financeDashboard.dart
View file @
cdad3e17
...
...
@@ -3,12 +3,7 @@ import 'package:flutter_svg/svg.dart';
import
'package:generp/Notifiers/financeProvider/DashboardProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/finance/AllPaymentRequesitionListsByModes.dart'
;
import
'package:generp/screens/finance/addPaymentReceiptList.dart'
;
import
'package:generp/screens/finance/directPaymentRequesitionList.dart'
;
import
'package:generp/screens/finance/paymentListPaymentRequisition.dart'
;
import
'package:generp/screens/finance/paymentreceiptList.dart'
;
import
'package:generp/screens/finance/submitPaymentRequestionListsByMode.dart'
;
import
'package:generp/screens/screensExports.dart'
;
import
'package:provider/provider.dart'
;
class
Financedashboard
extends
StatefulWidget
{
...
...
lib/screens/finance/paymentDetailsPaymentRequisition.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/financeProvider/RequesitionLidtDetailsProvider.dart'
;
import
'package:generp/Notifiers/financeProvider/approveRejectPaymentRequestResponse.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:provider/provider.dart'
;
...
...
lib/screens/finance/paymentListPaymentRequisition.dart
View file @
cdad3e17
...
...
@@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/screens/finance/paymentDetailsPaymentRequisition.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/financeProvider/paymentRequisitionPaymentsListProvider.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
...
...
@@ -91,7 +90,8 @@ class _PaymentlistpaymentrequisitionState extends State<Paymentlistpaymentrequis
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
)):
Container
(
))
:
requestLists
.
isNotEmpty
?
Container
(
child:
SingleChildScrollView
(
child:
Column
(
children:
[
...
...
@@ -311,7 +311,7 @@ class _PaymentlistpaymentrequisitionState extends State<Paymentlistpaymentrequis
],
),
),
),
):
Emptywidget
(
context
),
),
);
},
...
...
lib/screens/finance/paymentReceiptDetails.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/financeProvider/RequesitionLidtDetailsProvider.dart'
;
import
'package:generp/Notifiers/financeProvider/approveRejectPaymentRequestResponse.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/financeProvider/paymentReceiptsProvider.dart'
;
import
'../../Notifiers/financeProvider/paymentRequisitionPaymentsListProvider.dart'
;
import
'FileViewer.dart'
;
class
Paymentreceiptdetails
extends
StatefulWidget
{
...
...
lib/screens/finance/paymentreceiptList.dart
View file @
cdad3e17
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/screens/finance/paymentDetailsPaymentRequisition.dart'
;
import
'package:generp/screens/finance/paymentReceiptDetails.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -93,204 +92,202 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
)):
Container
(
child:
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
)):
requestLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
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
,
),
),
],
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Request Mode"
,
"Attachment"
,
"Receipt Date"
,
"Note"
,
];
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
],
),
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
,
),
),
),
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
,
),
Text
(
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
),
);
}),
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"
,
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Request Mode"
,
"Attachment"
,
"Receipt Date"
,
"Note"
,
];
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
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
semi_black
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
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
)
=>
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
),
),
);
},
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
cdad3e17
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/financeProvider/RequestionListProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
...
...
@@ -124,8 +125,8 @@ class _SubmitpaymentrequestionlistsbymodeState
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -209,8 +210,8 @@ class _SubmitpaymentrequestionlistsbymodeState
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -321,8 +322,8 @@ class _SubmitpaymentrequestionlistsbymodeState
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -380,6 +381,28 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
),
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
([
...
...
lib/screens/genTracker/ComplaintHistory.dart
View file @
cdad3e17
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/GeneratorDetailsProvider.dart'
;
...
...
lib/screens/genTracker/GeneratorDetails.dart
View file @
cdad3e17
...
...
@@ -86,7 +86,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
// val intent = Intent(Intent.ACTION_VIEW, Uri.parse(uri))
}
},
child:
Icon
(
Icons
.
directions
),
child:
SvgPicture
.
asset
(
"assets/svg/
directions
_ic.svg"
),
),
);
return
WillPopScope
(
...
...
lib/screens/genTracker/RegisterComplaint.dart
View file @
cdad3e17
...
...
@@ -257,8 +257,8 @@ class _RegistercomplaintState extends State<Registercomplaint> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -363,8 +363,8 @@ class _RegistercomplaintState extends State<Registercomplaint> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
@@ -471,8 +471,8 @@ class _RegistercomplaintState extends State<Registercomplaint> {
color:
AppColors
.
text_field_color
,
),
),
iconStyleData:
const
IconStyleData
(
icon:
Icon
(
Icons
.
keyboard_arrow_down
),
iconStyleData:
IconStyleData
(
icon:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
),
iconSize:
12
,
iconEnabledColor:
Color
(
0xFF2D2D2D
),
iconDisabledColor:
Colors
.
grey
,
...
...
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