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
3ad2ea55
Commit
3ad2ea55
authored
Jul 09, 2025
by
Sai Srinivas
Browse files
ios Changes
parent
38d17dba
Changes
24
Expand all
Show whitespace changes
Inline
Side-by-side
lib/Notifiers/PaymentDetailsProvider.dart
View file @
3ad2ea55
...
...
@@ -227,7 +227,6 @@ class Paymentdetailsprovider extends ChangeNotifier {
if
(
data
.
error
==
0
)
{
print
(
data
.
paymentCollectionId
);
_CollectionId
=
data
.
paymentCollectionId
??
0
;
notifyListeners
();
}
else
{}
}
else
{
...
...
@@ -427,7 +426,7 @@ class Paymentdetailsprovider extends ChangeNotifier {
email
,
)
async
{
if
(
actName
==
"Generator"
)
{
_saveAgainst
=
"
G
enerator"
;
_saveAgainst
=
"
g
enerator"
;
_genId
=
generatorID
;
}
else
{
_saveAgainst
=
"account"
;
...
...
lib/Notifiers/connectivity/connectivityProvider.dart
deleted
100644 → 0
View file @
38d17dba
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'dart:async'
;
class
Connectivityprovider
extends
ChangeNotifier
{
static
final
Connectivityprovider
_instance
=
Connectivityprovider
.
_
();
static
Connectivityprovider
get
instance
=>
_instance
;
final
Connectivity
_connectivity
=
Connectivity
();
bool
_isOnline
=
false
;
Map
<
ConnectivityResult
,
bool
>
_source
=
{
ConnectivityResult
.
none
:
false
};
Connectivityprovider
.
_
()
{
initialise
();
}
bool
get
isOnline
=>
_isOnline
;
Map
<
ConnectivityResult
,
bool
>
get
source
=>
_source
;
void
initialise
()
async
{
List
<
ConnectivityResult
>
result
=
await
_connectivity
.
checkConnectivity
();
_checkStatus
(
result
.
first
);
_connectivity
.
onConnectivityChanged
.
listen
((
result
)
{
_checkStatus
(
result
.
first
);
});
}
void
_checkStatus
(
ConnectivityResult
result
)
async
{
bool
isOnline
=
false
;
try
{
final
lookupResult
=
await
InternetAddress
.
lookup
(
'example.com'
);
isOnline
=
lookupResult
.
isNotEmpty
&&
lookupResult
[
0
].
rawAddress
.
isNotEmpty
;
}
on
SocketException
catch
(
_
)
{
isOnline
=
false
;
}
_source
=
{
result:
isOnline
};
_isOnline
=
isOnline
;
notifyListeners
();
// Notify all listeners of the change
}
void
dispose
()
{
// No StreamController to close, as we're using ChangeNotifier
}
}
lib/Notifiers/financeProvider/RequestionListProvider.dart
View file @
3ad2ea55
...
...
@@ -483,12 +483,11 @@ class Requestionlistprovider extends ChangeNotifier {
approvalEmployeeID
,
)
async
{
try
{
_submitClicked
=
true
;
notifyListeners
();
if
(!
validateForm
(
context
,
mode
))
{
_submitClicked
=
false
;
return
;
}
_submitClicked
=
true
;
notifyListeners
();
var
homeProvider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
...
...
@@ -511,8 +510,8 @@ class Requestionlistprovider extends ChangeNotifier {
bankIfscController
.
text
,
bankAcHolderController
.
text
,
bankUpiController
.
text
,
_image
,
approvalEmployeeID
,
_image
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
...
...
@@ -550,11 +549,20 @@ class Requestionlistprovider extends ChangeNotifier {
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_directPaymentAccounts
=
data
.
paymentAccounts
!;
_directPaymentAccounts
=
[
DirectPaymentAccounts
(
id:
""
,
name:
"Select"
),...
data
.
paymentAccounts
!];
_directPaymentAccounts
=
[
DirectPaymentAccounts
(
id:
""
,
name:
"Select"
),
...
data
.
paymentAccounts
!,
];
_directPaymentModes
=
data
.
paymentModes
!;
_directPaymentModes
=
[
DirectPaymentModes
(
name:
"Select"
,
id:
""
),...
data
.
paymentModes
!];
_directPaymentModes
=
[
DirectPaymentModes
(
name:
"Select"
,
id:
""
),
...
data
.
paymentModes
!,
];
_directAccounts
=
data
.
accounts
!;
_directAccounts
=
[
DirectAccounts
(
id:
""
,
name:
"Select"
),...
data
.
accounts
!];
_directAccounts
=
[
DirectAccounts
(
id:
""
,
name:
"Select"
),
...
data
.
accounts
!,
];
checkdirectPaymentDropDownsSlected
();
notifyListeners
();
...
...
@@ -1058,6 +1066,14 @@ class Requestionlistprovider extends ChangeNotifier {
!
_requestingPurposes
.
contains
(
_selectReqPurpose
))
{
_selectReqPurpose
=
null
;
}
if
(
_selectedApprovalEmployee
!=
null
&&
!
_approvalEmployee
.
contains
(
_selectedApprovalEmployee
))
{
_selectedApprovalEmployee
=
null
;
_selectedApprovalEmployeeID
=
null
;
_selectedApprovalEmployeeValue
=
null
;
}
notifyListeners
();
}
bool
validateForm
(
BuildContext
context
,
String
mode
)
{
...
...
@@ -1156,6 +1172,7 @@ class Requestionlistprovider extends ChangeNotifier {
// isValid = false;_submitClicked = false;
// }
buttonEnabled
=
isValid
;
_submitClicked
=
true
;
notifyListeners
();
return
isValid
;
}
...
...
lib/Notifiers/splashVersionNotifier.dart
View file @
3ad2ea55
...
...
@@ -42,7 +42,7 @@ class SplashVersionNotifier extends ChangeNotifier {
if
(
_packagedetails
.
isEmpty
)
{
await
initPackageInfo
();
}
var
loginProvider
=
Provider
.
of
<
Loginnotifier
>(
context
,
listen:
false
);
var
loginProvider
=
Provider
.
of
<
Loginnotifier
>(
context
,
listen:
false
);
var
loginStatus
=
await
SharedpreferencesService
().
getInt
(
"loginStatus"
);
print
(
"login status:
${loginStatus}
"
);
...
...
@@ -59,7 +59,6 @@ class SplashVersionNotifier extends ChangeNotifier {
}
if
(
Platform
.
isAndroid
&&
currentBuild
<
(
data
.
latestVersionCode
??
0
))
{
print
(
"Update"
);
AppUpdateDialouge
(
context
,
data
.
url
!,
data
.
releaseNotes
!);
}
else
if
(
Platform
.
isIOS
&&
...
...
lib/Utils/GlobalConstants.dart
View file @
3ad2ea55
String
didPushed
=
""
;
String
didPopped
=
""
;
var
connection
;
lib/Utils/commonServices.dart
View file @
3ad2ea55
import
'dart:async'
;
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/material.dart'
;
import
'package:fluttertoast/fluttertoast.dart'
;
toast
(
context
,
text
)
{
toast
(
context
,
text
)
{
// OwnToast(context, text, "0");
Fluttertoast
.
showToast
(
msg:
text
,
...
...
@@ -14,3 +17,35 @@ toast(context,text) {
fontSize:
15.0
,
);
}
class
MyConnectivity
{
MyConnectivity
.
_
();
static
final
_instance
=
MyConnectivity
.
_
();
static
MyConnectivity
get
instance
=>
_instance
;
final
_connectivity
=
Connectivity
();
final
_controller
=
StreamController
.
broadcast
();
Stream
get
myStream
=>
_controller
.
stream
;
void
initialise
()
async
{
ConnectivityResult
result
=
(
await
_connectivity
.
checkConnectivity
())
as
ConnectivityResult
;
_checkStatus
(
result
);
_connectivity
.
onConnectivityChanged
.
listen
((
result
)
{
_checkStatus
(
result
as
ConnectivityResult
);
});
}
void
_checkStatus
(
ConnectivityResult
result
)
async
{
bool
isOnline
=
false
;
try
{
final
result
=
await
InternetAddress
.
lookup
(
'example.com'
);
isOnline
=
result
.
isNotEmpty
&&
result
[
0
].
rawAddress
.
isNotEmpty
;
}
on
SocketException
catch
(
_
)
{
isOnline
=
false
;
}
_controller
.
sink
.
add
({
result:
isOnline
});
}
void
disposeStream
()
=>
_controller
.
close
();
}
lib/Utils/commonWidgets.dart
View file @
3ad2ea55
...
...
@@ -141,7 +141,7 @@ Widget textControllerWidget(
height:
hintText
==
"Enter Description"
?
150
:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
readonly
?
Color
(
0xFFD7D7D7
):
AppColors
.
text_field_color
,
color:
readonly
?
Color
(
0xFFD7D7D7
)
:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
...
...
@@ -175,7 +175,7 @@ Widget textControllerWidget(
?
[
FilteringTextInputFormatter
.
digitsOnly
]
:
[],
style:
TextStyle
(
color:
readonly
?
Color
(
0xFF9e9e9e
)
:
AppColors
.
semi_black
color:
readonly
?
Color
(
0xFF9e9e9e
)
:
AppColors
.
semi_black
,
),
decoration:
InputDecoration
(
counterText:
""
,
...
...
@@ -198,12 +198,13 @@ Widget textControllerWidget(
NoNetwork
(
context
)
{
return
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
scaffold_bg_color
),
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Image
.
asset
(
'assets/images/no_wifi.png'
,
width:
100
,
height:
100
),
//
Image.asset('assets/images/no_wifi.png', width: 100, height: 100),
SizedBox
(
height:
10
),
Center
(
child:
Text
(
...
...
lib/main.dart
View file @
3ad2ea55
...
...
@@ -247,8 +247,7 @@ class MyApp extends StatelessWidget {
tabBarTheme:
const
TabBarThemeData
(),
textSelectionTheme:
TextSelectionThemeData
(
cursorColor:
AppColors
.
app_blue
cursorColor:
AppColors
.
app_blue
,
),
dialogTheme:
const
DialogThemeData
(
shadowColor:
Colors
.
white
,
...
...
@@ -296,7 +295,7 @@ class MyApp extends StatelessWidget {
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
),
),
useMaterial3:
true
useMaterial3:
true
,
// inputDecorationTheme: InputDecorationTheme(
// hintStyle: TextStyle(
// fontWeight: FontWeight.w400,
...
...
lib/screens/AttendanceScreen.dart
View file @
3ad2ea55
This diff is collapsed.
Click to expand it.
lib/screens/WebERPIOS.dart
View file @
3ad2ea55
...
...
@@ -77,18 +77,16 @@ class _WebERPIOSState extends State<WebERPIOS> {
@override
Widget
build
(
BuildContext
context
)
{
return
WillPopScope
(
onWillPop:
()
async
{
if
(
await
webViewController
!.
canGoBack
())
{
webViewController
!.
goBack
();
return
false
;
// Prevent default back button behavior
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
return
true
;
// Allow default back button behavior
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
Widget
_scaffold
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
appbar
(
context
,
"ERP"
),
body:
Container
(
child:
Column
(
...
...
@@ -276,8 +274,6 @@ class _WebERPIOSState extends State<WebERPIOS> {
],
),
),
),
),
);
}
}
lib/screens/WebWhizzdomScreen.dart
View file @
3ad2ea55
...
...
@@ -16,13 +16,14 @@ import 'WebERPScreen.dart';
Future
runErpScreenApp2
(
)
async
{
await
FlutterDownloader
.
initialize
(
debug:
true
// optional: set false to disable printing logs to console
debug:
true
,
// optional: set false to disable printing logs to console
);
await
Permission
.
storage
.
request
();
}
class
WebWhizzdomScreen
extends
StatefulWidget
{
final
String
whizzdom_url
;
const
WebWhizzdomScreen
({
super
.
key
,
required
this
.
whizzdom_url
});
const
WebWhizzdomScreen
({
super
.
key
,
required
this
.
whizzdom_url
});
@override
State
<
WebWhizzdomScreen
>
createState
()
=>
_WebWhizzdomScreenState
();
...
...
@@ -46,7 +47,8 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
@override
void
initState
()
{
// loadData();
pullToRefreshController
=
kIsWeb
pullToRefreshController
=
kIsWeb
?
null
:
PullToRefreshController
(
settings:
pullToRefreshSettings
,
...
...
@@ -55,8 +57,10 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
webViewController
?.
reload
();
}
else
if
(
defaultTargetPlatform
==
TargetPlatform
.
iOS
)
{
webViewController
?.
loadUrl
(
urlRequest:
URLRequest
(
url:
await
webViewController
?.
getUrl
()));
urlRequest:
URLRequest
(
url:
await
webViewController
?.
getUrl
(),
),
);
}
},
);
...
...
@@ -68,24 +72,24 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
void
dispose
()
{
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
WillPopScope
(
onWillPop:
()
async
{
if
(
await
webViewController
!.
canGoBack
())
{
webViewController
!.
goBack
();
return
false
;
// Prevent default back button behavior
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
return
true
;
// Allow default back button behavior
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
Widget
_scaffold
(
BuildContext
context
)
{
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Whizzdom"
),
body:
Container
(
child:
Column
(
children:
<
Widget
>[
child:
Column
(
children:
<
Widget
>[
Expanded
(
child:
Stack
(
children:
[
...
...
@@ -93,10 +97,15 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
initialUrlRequest:
URLRequest
(
url:
WebUri
(
widget
.
whizzdom_url
),
),
androidOnGeolocationPermissionsShowPrompt:
(
InAppWebViewController
controller
,
String
origin
)
async
{
androidOnGeolocationPermissionsShowPrompt:
(
InAppWebViewController
controller
,
String
origin
,
)
async
{
return
GeolocationPermissionShowPromptResponse
(
origin:
origin
,
allow:
true
,
retain:
true
);
origin:
origin
,
allow:
true
,
retain:
true
,
);
},
initialOptions:
InAppWebViewGroupOptions
(
android:
AndroidInAppWebViewOptions
(
...
...
@@ -119,12 +128,15 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
),
),
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
String
origin
,
List
<
String
>
resources
)
async
{
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
String
origin
,
List
<
String
>
resources
,
)
async
{
return
PermissionRequestResponse
(
resources:
resources
,
action:
PermissionRequestResponseAction
.
GRANT
);
action:
PermissionRequestResponseAction
.
GRANT
,
);
},
onWebViewCreated:
(
controller
)
{
webViewController
=
controller
;
...
...
@@ -150,9 +162,9 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
pullToRefreshController
?.
endRefreshing
();
}
},
),
if
(
isLoading
)
...[
Container
(
if
(
isLoading
)
...[
Container
(
color:
Colors
.
white
.
withOpacity
(
0.7
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
...
...
@@ -164,9 +176,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
// duration: Duration(seconds: 2),
size:
50
,
),
const
SizedBox
(
height:
15
,
),
const
SizedBox
(
height:
15
),
SizedBox
(
width:
200
,
child:
Text
(
...
...
@@ -176,17 +186,20 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
decorationThickness:
0
,
fontSize:
15
,
fontWeight:
FontWeight
.
normal
,
color:
AppColors
.
app_blue
),
color:
AppColors
.
app_blue
,
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
),
)]
),
],
],
),
),
],
))
])),
),
),
);
...
...
lib/screens/crm/crmDashboard.dart
View file @
3ad2ea55
...
...
@@ -34,6 +34,15 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
@override
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Crmdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
gridPages
=
...
...
@@ -41,12 +50,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
.
where
((
page
)
=>
![
8
,
9
,
23
,
24
,
51
,
50
].
contains
(
page
.
id
))
.
toList
();
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
...
...
@@ -155,26 +159,17 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
physics:
AlwaysScrollableScrollPhysics
(),
child:
Column
(
children:
[
if
(
provider
.
allLeads
.
length
>
0
)...[
if
(
provider
.
allLeads
.
length
>
0
)
...[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
itemCount:
provider
.
allLeads
.
length
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
...
...
@@ -238,9 +233,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
.
filter
!
.
mode
,
filter:
provider
.
allLeads
[
jndex
]
.
filter
!,
provider
.
allLeads
[
jndex
].
filter
!,
),
),
);
...
...
@@ -280,10 +273,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
itemCount:
gridPages
.
length
,
itemBuilder:
(
context
,
index
)
{
// final icons = ["comm_ic_1", "comm_ic_2"];
...
...
@@ -291,8 +281,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
}
else
if
(
gridPages
[
index
].
pageName
==
"Nearby Leads"
)
{
}
else
if
(
gridPages
[
index
].
pageName
==
"Nearby Leads"
)
{
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/home_icons_5.svg"
,
height:
18
,
...
...
@@ -304,17 +293,14 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
return
InkResponse
(
onTap:
()
{
print
(
gridPages
[
index
].
pageName
!);
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
,
))
{
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Leadlistbymode
(
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
),
);
...
...
@@ -327,8 +313,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
builder:
(
context
)
=>
ProspectListByMode
(
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
),
);
...
...
@@ -412,11 +397,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
Container
(
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.34
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.34
,
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
...
...
@@ -435,16 +418,16 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
"Status"
,
];
final
subHeadings
=
[
provider
.
pendingTasksLists
[
index
].
aname
??
"-"
,
provider
.
pendingTasksLists
[
index
].
conmob
??
"-"
,
provider
.
pendingTasksLists
[
index
].
appdate
??
"-"
,
provider
.
pendingTasksLists
[
index
].
atype
??
"-"
,
provider
.
pendingTasksLists
[
index
].
anote
??
"-"
,
provider
.
pendingTasksLists
[
index
].
lstatus
??
"-"
,
provider
.
pendingTasksLists
[
index
].
aname
??
"-"
,
provider
.
pendingTasksLists
[
index
].
conmob
??
"-"
,
provider
.
pendingTasksLists
[
index
].
appdate
??
"-"
,
provider
.
pendingTasksLists
[
index
].
atype
??
"-"
,
provider
.
pendingTasksLists
[
index
].
anote
??
"-"
,
provider
.
pendingTasksLists
[
index
].
lstatus
??
"-"
,
];
return
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -467,7 +450,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
horizontal:
0
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
...
...
@@ -487,7 +471,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
],
),
);
},)
}),
],
),
);
...
...
@@ -495,7 +479,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
],
SizedBox
(
height:
150
,
),
SizedBox
(
height:
150
),
],
),
),
...
...
@@ -524,8 +508,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
),
),
);
},
);
...
...
lib/screens/finance/addPaymentReceiptList.dart
View file @
3ad2ea55
This diff is collapsed.
Click to expand it.
lib/screens/finance/directPaymentRequesitionList.dart
View file @
3ad2ea55
This diff is collapsed.
Click to expand it.
lib/screens/finance/financeDashboard.dart
View file @
3ad2ea55
...
...
@@ -29,16 +29,20 @@ class _FinancedashboardState extends State<Financedashboard> {
@override
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Dashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
pages
=
provider
.
accessiblePagesList
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Finance"
),
...
...
@@ -54,20 +58,14 @@ class _FinancedashboardState extends State<Financedashboard> {
Widget
?
SvgIcon
;
switch
(
pages
[
index
].
mode
)
{
case
"apr_lvl1"
:
SvgIcon
=
SvgPicture
.
asset
(
"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"
,
);
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
);
break
;
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
default
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
);
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
break
;
}
return
InkResponse
(
...
...
@@ -76,9 +74,7 @@ class _FinancedashboardState extends State<Financedashboard> {
if
(
pages
[
index
].
pageName
==
"Payments List"
)
{
navigate
=
Paymentlistpaymentrequisition
(
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
provider
.
accessiblePagesList
[
index
].
pageName
!,
);
}
else
if
(
provider
.
accessiblePagesList
[
index
]
...
...
@@ -86,9 +82,7 @@ class _FinancedashboardState extends State<Financedashboard> {
"Payment Receipts List"
)
{
navigate
=
Paymentreceiptlist
(
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
provider
.
accessiblePagesList
[
index
].
pageName
!,
);
}
else
if
(
provider
.
accessiblePagesList
[
index
]
...
...
@@ -106,16 +100,12 @@ class _FinancedashboardState extends State<Financedashboard> {
navigate
=
Allpaymentrequesitionlistsbymodes
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
provider
.
accessiblePagesList
[
index
]
.
pageName
!,
provider
.
accessiblePagesList
[
index
].
pageName
!,
);
}
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
,
),
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
);
},
child:
Container
(
...
...
@@ -133,25 +123,29 @@ class _FinancedashboardState extends State<Financedashboard> {
),
child:
Row
(
children:
[
if
(
provider
if
(
provider
.
accessiblePagesList
[
index
]
.
pageName
==
"Account List"
)...[
Expanded
(
flex:
1
,
"Account List"
)
...[
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/comm_ic_1.svg"
,
width:
25
,
"assets/svg/comm_ic_1.svg"
,
width:
25
,
),
)
]
else
if
(
provider
)
,
]
else
if
(
provider
.
accessiblePagesList
[
index
]
.
pageName
==
"Account Ledger"
)...[
Expanded
(
flex:
1
,
"Account Ledger"
)
...[
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/comm_ic_2.svg"
,
width:
25
,
"assets/svg/comm_ic_2.svg"
,
width:
25
,
),
)
]
else
...[
)
,
]
else
...[
Expanded
(
flex:
1
,
child:
SvgIcon
),
],
Expanded
(
...
...
@@ -170,7 +164,7 @@ class _FinancedashboardState extends State<Financedashboard> {
);
},
),
SizedBox
(
height:
150
,
)
SizedBox
(
height:
150
)
,
],
),
),
...
...
@@ -200,8 +194,6 @@ class _FinancedashboardState extends State<Financedashboard> {
),
),
),
),
),
);
},
);
...
...
@@ -296,11 +288,13 @@ class _FinancedashboardState extends State<Financedashboard> {
);
}
else
if
(
provider
.
accessiblePagesList2
[
index
]
.
pageName
!.
contains
(
"Add Account"
))
{
.
pageName
!
.
contains
(
"Add Account"
))
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Dashboard"
,
),
),
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
3ad2ea55
...
...
@@ -22,7 +22,8 @@ class Submitpaymentrequestionlistsbymode extends StatefulWidget {
const
Submitpaymentrequestionlistsbymode
({
super
.
key
,
required
this
.
mode
,
required
this
.
pageTitleName
,
this
.
accountId
,
required
this
.
pageTitleName
,
this
.
accountId
,
});
@override
...
...
@@ -34,7 +35,8 @@ class _SubmitpaymentrequestionlistsbymodeState
extends
State
<
Submitpaymentrequestionlistsbymode
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
11
,
(
index
)
=>
FocusNode
());
GlobalKey
_globalKey
=
GlobalKey
();
ScrollController
scrollcontroller
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
...
...
@@ -46,69 +48,49 @@ class _SubmitpaymentrequestionlistsbymodeState
);
print
(
"widget.accountId
${widget.accountId}
"
);
provider
.
addPaymentRequestionViewAPI
(
context
,
widget
.
mode
);
Future
.
delayed
(
Duration
(
milliseconds:
500
),()
{
Future
.
delayed
(
Duration
(
milliseconds:
500
),
()
{
if
(
widget
.
mode
==
"self"
&&
provider
.
accounts
.
length
==
1
)
{
provider
.
selectedAccount
=
provider
.
accounts
.
first
;
provider
.
accountId
=
provider
.
accounts
.
first
.
id
!;
}
else
if
(
widget
.
mode
==
"other"
&&
provider
.
accounts
!=
null
)
{
}
else
if
(
widget
.
mode
==
"other"
&&
provider
.
accounts
!=
null
)
{
if
(
widget
.
accountId
!=
null
)
{
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
(
(
element
)
=>
element
.
id
==
widget
.
accountId
,
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
(
(
element
)
=>
element
.
id
==
widget
.
accountId
,
);
print
(
"sdsd,al;,al
${provider.selectedAccount!.id}
"
);
print
(
"sdsd,al;,al
${provider.selectedAccount!.name}
"
);
provider
.
accountId
=
provider
.
accounts
.
firstWhere
(
(
e
)
=>
e
.
id
==
widget
.
accountId
,
)!
.
firstWhere
((
e
)
=>
e
.
id
==
widget
.
accountId
)!
.
id
!;
provider
.
accountValue
=
provider
.
accounts
.
firstWhere
(
(
e
)
=>
e
.
id
==
widget
.
accountId
,
)!
.
firstWhere
((
e
)
=>
e
.
id
==
widget
.
accountId
)!
.
name
!;
}
}
}
,
);
});
});
}
@override
void
dispose
()
{
scrollcontroller
.
dispose
();
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
super
.
dispose
();
}
autofill
(
res
){
autofill
(
res
)
{
print
(
"auto"
);
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
listen:
false
,
);
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
listen:
false
);
if
(
provider
.
accounts
!=
null
)
{
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
((
element
)
=>
element
.
id
==
res
,);
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
(
(
element
)
=>
element
.
id
==
res
,
);
print
(
"sdsd,al;,al
${provider.selectedAccount}
"
);
provider
.
accountId
=
provider
.
accounts
.
firstWhere
(
(
e
)
=>
e
.
id
==
res
,
)
.
id
!;
provider
.
accountId
=
provider
.
accounts
.
firstWhere
((
e
)
=>
e
.
id
==
res
).
id
!;
provider
.
accountValue
=
provider
.
accounts
.
firstWhere
(
(
e
)
=>
e
.
id
==
res
,
)
.
name
!;
provider
.
accounts
.
firstWhere
((
e
)
=>
e
.
id
==
res
).
name
!;
}
}
...
...
@@ -121,12 +103,10 @@ class _SubmitpaymentrequestionlistsbymodeState
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
...
...
@@ -143,6 +123,7 @@ class _SubmitpaymentrequestionlistsbymodeState
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
SingleChildScrollView
(
controller:
scrollcontroller
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -257,7 +238,9 @@ class _SubmitpaymentrequestionlistsbymodeState
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Requesition"
,),
(
context
)
=>
Addcommonpayment
(
from:
"Requesition"
,
),
),
);
print
(
"return Response:
${res}
"
);
...
...
@@ -441,6 +424,27 @@ class _SubmitpaymentrequestionlistsbymodeState
"hfjkshfg"
+
provider
.
paymentModeId
.
toString
(),
);
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
context
=
_globalKey
.
currentContext
;
if
(
context
!=
null
)
{
Scrollable
.
ensureVisible
(
context
,
duration:
Duration
(
milliseconds:
300
,
),
curve:
Curves
.
easeInOut
,
);
}
});
}
}
}
},
...
...
@@ -455,7 +459,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
if
(
widget
.
mode
==
"other"
)...[
if
(
widget
.
mode
==
"other"
)
...[
TextWidget
(
context
,
"Select Approval Employee"
),
DropdownButtonHideUnderline
(
child:
Row
(
...
...
@@ -488,13 +492,18 @@ class _SubmitpaymentrequestionlistsbymodeState
value:
provider
.
selectedApprovalEmployee
,
onChanged:
(
Employees
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
approvalEmployee
.
isNotEmpty
)
{
provider
.
selectedApprovalEmployee
=
value
;
if
(
provider
.
approvalEmployee
.
isNotEmpty
)
{
provider
.
selectedApprovalEmployee
=
value
;
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
selectedApprovalEmployeeID
=
value
.
id
!;
provider
.
selectedApprovalEmployeeValue
=
value
.
name
!;
provider
.
selectedApprovalEmployeeID
=
value
.
id
!;
provider
.
selectedApprovalEmployeeValue
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
paymentModeId
.
toString
(),
...
...
@@ -548,7 +557,9 @@ class _SubmitpaymentrequestionlistsbymodeState
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
Expanded
(
flex:
4
,
child:
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
...
...
@@ -556,7 +567,10 @@ class _SubmitpaymentrequestionlistsbymodeState
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
...
...
@@ -568,6 +582,7 @@ class _SubmitpaymentrequestionlistsbymodeState
height:
15
,
),
),
),
],
),
),
...
...
@@ -580,6 +595,7 @@ class _SubmitpaymentrequestionlistsbymodeState
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...[
SizedBox
(
height:
3
,
key:
_globalKey
),
textControllerWidget
(
context
,
provider
.
bankNameController
,
...
...
@@ -645,7 +661,7 @@ class _SubmitpaymentrequestionlistsbymodeState
"RTGS"
,
"IMPS"
,
"NEFT"
,
"UPI"
"UPI"
,
].
contains
(
provider
.
paymentModeValue
))
...[
textControllerWidget
(
context
,
...
...
@@ -688,18 +704,18 @@ class _SubmitpaymentrequestionlistsbymodeState
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
fals
e
;
provider
.
submitClicked
=
tru
e
;
provider
.
addPaymentRequestionSubmitAPI
(
context
,
widget
.
mode
,
provider
.
selectedApprovalEmployeeID
provider
.
selectedApprovalEmployeeID
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
...
...
lib/screens/genTracker/GenTrackerDashboard.dart
View file @
3ad2ea55
...
...
@@ -17,6 +17,15 @@ class Gentrackerdashboard extends StatefulWidget {
class
_GentrackerdashboardState
extends
State
<
Gentrackerdashboard
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
final
names
=
[
"Generator Details"
,
// "Register Complaint",
...
...
@@ -29,12 +38,7 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
// "gent_tag_loc",
"gent_tag_den"
,
];
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Tracker"
),
...
...
@@ -131,16 +135,13 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
"Note: 'Tag Location' and 'Register Complaint' are moved to 'Generator Details'."
,
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
fontSize:
14
),
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
fontSize:
14
),
),
),
),
SizedBox
(
height:
10
),
],
),
),
),
);
}
}
lib/screens/inventory/InventoryScreen.dart
View file @
3ad2ea55
...
...
@@ -35,14 +35,18 @@ class _InventoryScreenState extends State<InventoryScreen> {
@override
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
InventoryProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
...
...
@@ -55,7 +59,6 @@ class _InventoryScreenState extends State<InventoryScreen> {
height:
250
,
child:
QRView
(
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
...
...
@@ -64,7 +67,6 @@ class _InventoryScreenState extends State<InventoryScreen> {
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderLength:
60
,
...
...
@@ -77,7 +79,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
Text
(
"Scan QR"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
Text
(
"to open Inventory"
,
...
...
@@ -88,8 +94,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
Text
(
"or"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
InkResponse
(
onTap:
()
async
{
...
...
@@ -98,17 +107,17 @@ class _InventoryScreenState extends State<InventoryScreen> {
child:
Text
(
"Tap To Enter Part ID"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
17
,
style:
TextStyle
(
fontSize:
17
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),
color:
AppColors
.
app_blue
,
),
),
),
SizedBox
(
height:
50
),
],
),
),
),
),
);
},
);
...
...
@@ -160,7 +169,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
),
),
),
SizedBox
(
height:
5
,
),
SizedBox
(
height:
5
),
Container
(
height:
48
,
alignment:
Alignment
.
center
,
...
...
@@ -188,7 +197,8 @@ class _InventoryScreenState extends State<InventoryScreen> {
controller:
partIDcontroller
,
keyboardType:
TextInputType
.
text
,
focusNode:
partIDfocusNode
,
textCapitalization:
TextCapitalization
.
characters
,
textCapitalization:
TextCapitalization
.
characters
,
style:
TextStyle
(
fontSize:
14
),
onChanged:
(
value
)
{},
...
...
@@ -210,7 +220,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
),
),
),
SizedBox
(
height:
15
,
),
SizedBox
(
height:
15
),
InkWell
(
onTap:
()
{
provider
.
LoadPartDetailsApifunction
(
...
...
@@ -238,9 +248,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
child:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
fontSize:
15
),
fontSize:
15
,
),
),
),
),
...
...
lib/screens/order/orderModuleDashboard.dart
View file @
3ad2ea55
...
...
@@ -23,22 +23,30 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
provider
.
orderDashboardAPIFunction
(
context
,
"executive"
,
""
,
""
,
""
);
provider
.
ordersAccessiblePagesAPIFunction
(
context
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Pagesdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
pages
=
provider
.
ordersAccessiblePagesList
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Orders"
),
...
...
@@ -47,15 +55,15 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
child:
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
borderRadius:
BorderRadius
.
circular
(
16
)
,
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
itemCount:
provider
.
ordersgain
.
length
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
...
...
@@ -64,7 +72,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
0.65
childAspectRatio:
0.65
,
),
itemBuilder:
(
context
,
jndex
)
{
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
...
...
@@ -149,79 +157,69 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
Widget
?
SvgIcon
;
switch
(
pages
[
index
].
mode
)
{
case
"level_one_approval"
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
,
);
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
break
;
case
"level_two_approval"
:
case
"level_two_rejected"
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
,
);
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
);
break
;
default
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
break
;
};
}
;
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
)
)
{
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
))
{
navigate
=
AddorderScreen
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
pageTitleName:
pages
[
index
].
pageName
!,
);
}
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Payment"
)
)
{
}
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Payment"
))
{
(
"navigate to Add Payment"
);
navigate
=
AddpaymentScreen
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
pageTitleName:
pages
[
index
].
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Payments List"
))
{
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Payments List"
,
))
{
navigate
=
Paymentlistsbymode
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
pageTitleName:
pages
[
index
].
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Order List"
)){
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Order List"
,
))
{
navigate
=
OrderslistbyModes
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
pageTitleName:
pages
[
index
].
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
==
"Add TPC Agent"
){
}
else
if
(
pages
[
index
].
pageName
==
"Add TPC Agent"
)
{
navigate
=
AddtpcagentScreen
();
}
else
if
(
pages
[
index
].
pageName
==
"TPC Agent List (Admin)"
){
}
else
if
(
pages
[
index
].
pageName
==
"TPC Agent List (Admin)"
)
{
navigate
=
Tpcagentlistbymode
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
pageTitleName:
pages
[
index
].
pageName
!,
);
}
else
if
(
pages
[
index
].
pageName
==
"Pending TPC Issue List"
){
}
else
if
(
pages
[
index
].
pageName
==
"Pending TPC Issue List"
)
{
navigate
=
Tpcagentissuelist
(
mode:
pages
[
index
].
mode
!,
pageTitleName:
pages
[
index
]
.
pageName
!,
pageTitleName:
pages
[
index
].
pageName
!,
);
}
if
(
navigate
!=
null
){
if
(
navigate
!=
null
)
{
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
);
}
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
...
...
@@ -241,9 +239,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
Expanded
(
flex:
1
,
child:
SvgIcon
),
Expanded
(
flex:
5
,
child:
Text
(
"
${pages[index].pageName}
"
,
),
child:
Text
(
"
${pages[index].pageName}
"
),
),
Expanded
(
flex:
1
,
...
...
@@ -261,8 +257,6 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
),
),
),
),
),
);
},
);
...
...
lib/screens/serviceEngineer/AccountSuggestions.dart
View file @
3ad2ea55
...
...
@@ -27,7 +27,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Accounts"
),
...
...
@@ -54,7 +54,10 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
borderRadius:
BorderRadius
.
circular
(
14
),
border:
searchFocusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
)
:
null
,
),
// alignment: Alignment.center,
...
...
@@ -123,7 +126,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
builder:
(
context
)
=>
Paymentdetails
(
accountName:
"Account"
,
name:
accountList
![
index
].
accountName
,
name:
accountList
![
index
]
.
accountName
,
genId:
""
,
referenceID:
accountList
![
index
].
accountId
,
...
...
@@ -135,7 +140,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
child:
SizedBox
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
10
),
child:
Row
(
children:
[
...
...
@@ -148,9 +154,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
width:
30
,
...
...
@@ -159,7 +164,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
),
),
),
SizedBox
(
width:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
Text
(
...
...
@@ -168,7 +173,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
maxLines:
3
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
semi_black
color:
AppColors
.
semi_black
,
),
),
),
...
...
@@ -189,7 +194,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
// Set width to fill parent width
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
...
...
@@ -197,7 +203,12 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
topRight:
Radius
.
circular
(
30.0
),
),
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
,
),
child:
Container
(
child:
Align
(
alignment:
Alignment
.
center
,
...
...
Prev
1
2
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