Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
ecd8fcd1
Commit
ecd8fcd1
authored
Jul 07, 2025
by
Sai Srinivas
Browse files
07-07-2025 By Sai Srinivas
Pubspec and Safe Area.
parent
67ab0f3e
Changes
92
Expand all
Hide whitespace changes
Inline
Side-by-side
lib/Notifiers/GeneratorDetailsProvider.dart
View file @
ecd8fcd1
...
@@ -278,7 +278,6 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -278,7 +278,6 @@ class Generatordetailsprovider extends ChangeNotifier {
}
}
void
resetForm
()
{
void
resetForm
()
{
_qrViewController
!.
dispose
();
engNoController
.
clear
();
engNoController
.
clear
();
_selectedComplaintType
=
null
;
_selectedComplaintType
=
null
;
_selectedCategoryType
=
null
;
_selectedCategoryType
=
null
;
...
@@ -289,6 +288,8 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -289,6 +288,8 @@ class Generatordetailsprovider extends ChangeNotifier {
_selectedCategoryId
=
""
;
_selectedCategoryId
=
""
;
_selectedDescriptionId
=
""
;
_selectedDescriptionId
=
""
;
_selectedDescription
=
""
;
_selectedDescription
=
""
;
_qrViewController
!.
dispose
();
}
}
initialFunction
(
from
)
async
{
initialFunction
(
from
)
async
{
...
...
lib/Notifiers/NearByGeneratorsProvider.dart
View file @
ecd8fcd1
...
@@ -130,7 +130,7 @@ set markers(List<Marker> value){
...
@@ -130,7 +130,7 @@ set markers(List<Marker> value){
final
lat
=
_currentLocation
!.
latitude
;
final
lat
=
_currentLocation
!.
latitude
;
final
lang
=
_currentLocation
!.
longitude
!;
final
lang
=
_currentLocation
!.
longitude
!;
_latlongs
=
'
$lat
,
$lang
'
;
_latlongs
=
'
$lat
,
$lang
'
;
LoadNearbyGeneratorsAPI
(
context
);
LoadNearbyGeneratorsAPI
(
context
,
_currentValue
);
}
}
}
}
...
@@ -146,7 +146,7 @@ set markers(List<Marker> value){
...
@@ -146,7 +146,7 @@ set markers(List<Marker> value){
}
}
Future
<
void
>
LoadNearbyGeneratorsAPI
(
BuildContext
context
)
async
{
Future
<
void
>
LoadNearbyGeneratorsAPI
(
BuildContext
context
,
radius
)
async
{
if
(
_latlongs
.
isEmpty
||
_currentValue
<=
0
)
{
if
(
_latlongs
.
isEmpty
||
_currentValue
<=
0
)
{
print
(
"Invalid parameters: latlongs=
$_latlongs
, currentValue=
$_currentValue
"
);
print
(
"Invalid parameters: latlongs=
$_latlongs
, currentValue=
$_currentValue
"
);
return
;
return
;
...
@@ -231,6 +231,19 @@ set markers(List<Marker> value){
...
@@ -231,6 +231,19 @@ set markers(List<Marker> value){
position:
_parseLatLng
(
generator
.
loc
),
position:
_parseLatLng
(
generator
.
loc
),
icon:
BitmapDescriptor
.
fromBytes
(
resizedBytes
),
icon:
BitmapDescriptor
.
fromBytes
(
resizedBytes
),
infoWindow:
InfoWindow
(
infoWindow:
InfoWindow
(
onTap:
()
{
print
(
"INFO WINDOW TAP"
);
Navigator
.
push
(
context
,
// Use the widget's BuildContext, which is valid here
MaterialPageRoute
(
builder:
(
context
)
=>
Generatordetails
(
activityName:
"NearByGenerators"
,
genLocation:
generator
.
loc
,
generatorId:
generator
.
generatorId
,
),
),
);
},
title:
"Customer Name:
${generator.accName}
"
,
title:
"Customer Name:
${generator.accName}
"
,
snippet:
"Product Name:
${generator.productName}
"
,
snippet:
"Product Name:
${generator.productName}
"
,
...
@@ -238,16 +251,16 @@ set markers(List<Marker> value){
...
@@ -238,16 +251,16 @@ set markers(List<Marker> value){
zIndex:
100
,
zIndex:
100
,
onTap:
()
{
onTap:
()
{
int
index
=
generatorslist
.
indexWhere
(
//
int index = generatorslist.indexWhere(
(
techResponse
)
=>
//
(techResponse) =>
techResponse
.
generatorId
==
generator
.
generatorId
,
//
techResponse.generatorId == generator.generatorId,
);
//
);
onMarkerTap
(
//
onMarkerTap(
context
,
//
context,
"NearByGenerators"
,
//
"NearByGenerators",
generator
.
loc
,
//
generator.loc,
generator
.
generatorId
,
//
generator.generatorId,
);
//
);
// print("index:${index}");
// print("index:${index}");
// Navigator.push(
// Navigator.push(
// context,
// context,
...
...
lib/Notifiers/crmProvider/crmNearbyOpenLeadsProvider.dart
View file @
ecd8fcd1
...
@@ -39,7 +39,6 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -39,7 +39,6 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
Timer
?
_timer
;
Timer
?
_timer
;
File
?
_image
;
File
?
_image
;
bool
_isLoading
=
true
;
bool
_isLoading
=
true
;
String
_selectedItem
=
'Active'
;
double
_currentValue
=
1.0
;
double
_currentValue
=
1.0
;
Timer
?
_debounceTimer
;
Timer
?
_debounceTimer
;
...
@@ -59,17 +58,13 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -59,17 +58,13 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
bool
get
isLoading
=>
_isLoading
;
bool
get
isLoading
=>
_isLoading
;
Timer
?
get
timer
=>
_timer
;
Timer
?
get
timer
=>
_timer
;
File
?
get
image
=>
_image
;
File
?
get
image
=>
_image
;
String
get
selectedItem
=>
_selectedItem
;
double
get
currentValue
=>
_currentValue
;
double
get
currentValue
=>
_currentValue
;
set
currentValue
(
value
){
set
currentValue
(
value
){
_currentValue
=
value
;
_currentValue
=
value
;
notifyListeners
();
notifyListeners
();
}
}
set
selectedItem
(
String
value
){
_selectedItem
=
value
;
notifyListeners
();
}
set
markers
(
List
<
Marker
>
value
){
set
markers
(
List
<
Marker
>
value
){
_markers
=
value
;
_markers
=
value
;
...
@@ -82,7 +77,6 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -82,7 +77,6 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
void
resetAll
(){
void
resetAll
(){
_currentValue
=
1.0
;
_currentValue
=
1.0
;
_selectedItem
=
""
;
_markers
=
[];
_markers
=
[];
_addresses
=
[];
_addresses
=
[];
}
}
...
@@ -128,7 +122,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -128,7 +122,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
final
lat
=
_currentLocation
!.
latitude
;
final
lat
=
_currentLocation
!.
latitude
;
final
lang
=
_currentLocation
!.
longitude
!;
final
lang
=
_currentLocation
!.
longitude
!;
_latlongs
=
'
$lat
,
$lang
'
;
_latlongs
=
'
$lat
,
$lang
'
;
LoadNearbyOpenLeadsAPI
(
context
);
LoadNearbyOpenLeadsAPI
(
context
,
_currentValue
);
}
}
}
}
...
@@ -144,7 +138,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -144,7 +138,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
}
}
Future
<
void
>
LoadNearbyOpenLeadsAPI
(
BuildContext
context
)
async
{
Future
<
void
>
LoadNearbyOpenLeadsAPI
(
BuildContext
context
,
radius
)
async
{
if
(
_latlongs
.
isEmpty
||
_currentValue
<=
0
)
{
if
(
_latlongs
.
isEmpty
||
_currentValue
<=
0
)
{
print
(
"Invalid parameters: latlongs=
$_latlongs
, currentValue=
$_currentValue
"
);
print
(
"Invalid parameters: latlongs=
$_latlongs
, currentValue=
$_currentValue
"
);
return
;
return
;
...
@@ -155,7 +149,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -155,7 +149,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
provider
.
empId
,
provider
.
empId
,
provider
.
session
,
provider
.
session
,
_latlongs
,
_latlongs
,
_currentValue
radius
);
);
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
...
@@ -223,6 +217,21 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -223,6 +217,21 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
position:
_parseLatLng
(
leads
.
loc
),
position:
_parseLatLng
(
leads
.
loc
),
icon:
BitmapDescriptor
.
fromBytes
(
resizedBytes
),
icon:
BitmapDescriptor
.
fromBytes
(
resizedBytes
),
infoWindow:
InfoWindow
(
infoWindow:
InfoWindow
(
onTap:
()
{
// onMarkerTap(context, leads.id);
Navigator
.
push
(
context
,
// Use the widget's BuildContext, which is valid here
MaterialPageRoute
(
builder:
(
context
)
=>
LeadDetailsByMode
(
mode:
""
,
pageTitleName:
"Lead Details"
,
leadId:
leads
.
id
,
),
),
);
},
anchor:
Offset
(
0
,
0
),
title:
"Name:
${leads.name}
"
,
title:
"Name:
${leads.name}
"
,
snippet:
"Address:
${leads.address}
"
,
snippet:
"Address:
${leads.address}
"
,
...
@@ -234,10 +243,10 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
...
@@ -234,10 +243,10 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
(
techResponse
)
=>
(
techResponse
)
=>
techResponse
.
id
==
leads
.
id
,
techResponse
.
id
==
leads
.
id
,
);
);
onMarkerTap
(
//
onMarkerTap(
context
,
//
context,
leads
.
id
,
//
leads.id,
);
//
);
// print("index:${index}");
// print("index:${index}");
// Navigator.push(
// Navigator.push(
// context,
// context,
...
...
lib/Notifiers/financeProvider/RequesitionLidtDetailsProvider.dart
View file @
ecd8fcd1
...
@@ -317,13 +317,18 @@ String? proposedAmountError;
...
@@ -317,13 +317,18 @@ String? proposedAmountError;
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
String
?
remarksError
;
String
?
ApprovedAmountError
;
Future
<
void
>
paymentrequisitionRejectSubmitAPIFunction
(
context
,
Future
<
void
>
paymentrequisitionRejectSubmitAPIFunction
(
context
,
mode
,
mode
,
payment_request_id
,
payment_request_id
,
approve_remarks
,)
async
{
approve_remarks
,)
async
{
try
{
try
{
if
(
approve_remarks
.
toString
().
trim
().
isEmpty
)
{
if
(
approve_remarks
.
toString
().
trim
().
isEmpty
)
{
toast
(
context
,
"Enter Remarks"
);
remarksError
=
"Please Enter Remarks"
;
notifyListeners
();
// toast(context,"Enter Remarks");
return
;
return
;
}
}
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
...
@@ -362,6 +367,16 @@ String? proposedAmountError;
...
@@ -362,6 +367,16 @@ String? proposedAmountError;
approve_remarks
,
approve_remarks
,
proposed_payment_account_id
,
proposed_payment_account_id
,
);
);
if
(
approved_amount
.
toString
().
trim
().
isEmpty
){
ApprovedAmountError
=
"Enter Amount"
;
notifyListeners
();
return
;
}
if
(
approve_remarks
.
toString
().
trim
().
isEmpty
)
{
remarksError
=
"Please Enter Remarks"
;
notifyListeners
();
return
;
}
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
paymentRequesitionDetails
(
context
,
payment_request_id
);
paymentRequesitionDetails
(
context
,
payment_request_id
);
...
@@ -428,6 +443,8 @@ String? proposedAmountError;
...
@@ -428,6 +443,8 @@ String? proposedAmountError;
_selectedValue
=
""
;
_selectedValue
=
""
;
_selectedID
=
null
;
_selectedID
=
null
;
proposedAmountError
=
null
;
proposedAmountError
=
null
;
remarksError
=
null
;
ApprovedAmountError
=
null
;
checkDropDownReset
();
checkDropDownReset
();
notifyListeners
();
notifyListeners
();
...
...
lib/main.dart
View file @
ecd8fcd1
...
@@ -4,6 +4,7 @@ import 'package:firebase_core/firebase_core.dart';
...
@@ -4,6 +4,7 @@ import 'package:firebase_core/firebase_core.dart';
import
'package:firebase_messaging/firebase_messaging.dart'
;
import
'package:firebase_messaging/firebase_messaging.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_local_notifications/flutter_local_notifications.dart'
;
import
'package:flutter_local_notifications/flutter_local_notifications.dart'
;
import
'package:flutter_ringtone_player/flutter_ringtone_player.dart'
;
import
'package:flutter_ringtone_player/flutter_ringtone_player.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
@@ -149,6 +150,8 @@ class MyApp extends StatelessWidget {
...
@@ -149,6 +150,8 @@ class MyApp extends StatelessWidget {
// This widget is the root of your application.
// This widget is the root of your application.
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
// SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription());
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
edgeToEdge
);
FirebaseMessaging
.
onMessageOpenedApp
.
listen
((
RemoteMessage
message
)
{
FirebaseMessaging
.
onMessageOpenedApp
.
listen
((
RemoteMessage
message
)
{
String
type
=
message
.
data
[
'type'
]
??
''
;
String
type
=
message
.
data
[
'type'
]
??
''
;
String
redirectUrl
=
message
.
data
[
'redirect_url'
]
??
''
;
String
redirectUrl
=
message
.
data
[
'redirect_url'
]
??
''
;
...
@@ -293,6 +296,7 @@ class MyApp extends StatelessWidget {
...
@@ -293,6 +296,7 @@ class MyApp extends StatelessWidget {
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
),
),
),
),
useMaterial3:
true
// inputDecorationTheme: InputDecorationTheme(
// inputDecorationTheme: InputDecorationTheme(
// hintStyle: TextStyle(
// hintStyle: TextStyle(
// fontWeight: FontWeight.w400,
// fontWeight: FontWeight.w400,
...
...
lib/screens/AttendanceScreen.dart
View file @
ecd8fcd1
This diff is collapsed.
Click to expand it.
lib/screens/CheckInScreen.dart
View file @
ecd8fcd1
...
@@ -50,11 +50,13 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
...
@@ -50,11 +50,13 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
onWillPop:
()
{
onWillPop:
()
{
provider
.
dispose
();
provider
.
dispose
();
return
onBackPressed
(
context
);},
return
onBackPressed
(
context
);},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
context
,
widget
.
getAttendanceStatus
==
0
?
"Check In"
:
"Check Out"
,
provider
.
dispose
,
SizedBox
(
width:
0
,)),
bottom:
Platform
.
isIOS
?
false
:
true
,
body:
SafeArea
(
child:
Scaffold
(
child:
Container
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
getAttendanceStatus
==
0
?
"Check In"
:
"Check Out"
,
provider
.
dispose
,
SizedBox
(
width:
0
,)),
body:
Container
(
child:
SafeArea
(
child:
SafeArea
(
child:
Column
(
child:
Column
(
children:
[
children:
[
...
...
lib/screens/FrontCameraCapture.dart
View file @
ecd8fcd1
...
@@ -80,60 +80,61 @@ class _CheckOutScreenState extends State<FrontCameraCapture> {
...
@@ -80,60 +80,61 @@ class _CheckOutScreenState extends State<FrontCameraCapture> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
Size
size
=
MediaQuery
.
of
(
context
).
size
;
Size
size
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
return
SafeArea
(
// appBar: AppBar(automaticallyImplyLeading: false),
top:
false
,
body:
SafeArea
(
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
child:
Scaffold
(
isLoading
// appBar: AppBar(automaticallyImplyLeading: false),
?
Center
(
child:
CircularProgressIndicator
())
body:
isLoading
:
Row
(
?
Center
(
child:
CircularProgressIndicator
())
children:
[
:
Row
(
Expanded
(
children:
[
child:
SizedBox
(
Expanded
(
height:
double
.
infinity
,
child:
SizedBox
(
child:
height:
double
.
infinity
,
cam_controller
.
value
.
isInitialized
child:
?
Transform
(
cam_controller
.
value
.
isInitialized
alignment:
Alignment
.
center
,
?
Transform
(
transform:
Matrix4
.
rotationY
(
math
.
pi
),
alignment:
Alignment
.
center
,
child:
CameraPreview
(
transform:
Matrix4
.
rotationY
(
math
.
pi
),
cam_controller
,
child:
CameraPreview
(
child:
Align
(
cam_controller
,
alignment:
Alignment
.
bottomCenter
,
child:
Align
(
child:
GestureDetector
(
alignment:
Alignment
.
bottomCenter
,
onTap:
()
async
{
child:
GestureDetector
(
if
(!
cam_controller
onTap:
()
async
{
.
value
if
(!
cam_controller
.
isInitialized
)
.
value
return
;
.
isInitialized
)
final
image
=
return
;
await
cam_controller
final
image
=
.
takePicture
();
await
cam_controller
_image
=
File
(
image
.
path
);
.
takePicture
();
Navigator
.
pop
(
context
,
_image
);
_image
=
File
(
image
.
path
);
Navigator
.
pop
(
context
,
_image
);
},
child:
Container
(
},
height:
100
,
child:
Container
(
width:
double
.
infinity
,
height:
100
,
padding:
EdgeInsets
.
all
(
10
),
width:
double
.
infinity
,
decoration:
BoxDecoration
(
padding:
EdgeInsets
.
all
(
10
),
color:
Colors
.
black26
decoration:
BoxDecoration
(
),
color:
Colors
.
black26
child:
Center
(
),
child:
SvgPicture
.
asset
(
"assets/svg/check_in_cam.svg"
,
width:
50
,
height:
50
,)
child:
Center
(
child:
SvgPicture
.
asset
(
"assets/svg/check_in_cam.svg"
,
width:
50
,
height:
50
,)
),
),
),
),
),
),
),
),
)
)
,
:
Center
(
child:
Text
(
"Camera not ready"
)
),
),
)
,
)
),
:
Center
(
child:
Text
(
"Camera not ready"
)
),
]
,
)
,
),
),
],
),
),
),
);
);
}
}
...
...
lib/screens/HomeScreen.dart
View file @
ecd8fcd1
...
@@ -164,12 +164,14 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -164,12 +164,14 @@ class _MyHomePageState extends State<MyHomePage> {
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
homescreen
.
DashboardApiFunction
(
context
);
homescreen
.
DashboardApiFunction
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
Column
(
child:
Column
(
children:
[
children:
[
Expanded
(
Expanded
(
...
...
lib/screens/LoginScreen.dart
View file @
ecd8fcd1
...
@@ -157,11 +157,13 @@ class _LoginScreenState extends State<LoginScreen>
...
@@ -157,11 +157,13 @@ class _LoginScreenState extends State<LoginScreen>
builder:
(
context
,
loginProv
,
child
)
{
builder:
(
context
,
loginProv
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
onBackPressed
,
onWillPop:
onBackPressed
,
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
body:
SafeArea
(
child:
Scaffold
(
child:
KeyboardVisibilityProvider
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
KeyboardVisibilityProvider
(
controller:
_keyboardVisibilityController
,
controller:
_keyboardVisibilityController
,
child:
Stack
(
child:
Stack
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
@@ -486,7 +488,7 @@ class _LoginScreenState extends State<LoginScreen>
...
@@ -486,7 +488,7 @@ class _LoginScreenState extends State<LoginScreen>
password
.
text
,
password
.
text
,
);
);
var
f
=
FocusScope
.
of
(
context
);
var
f
=
FocusScope
.
of
(
context
);
if
(!
f
.
hasPrimaryFocus
)
{
if
(!
f
.
hasPrimaryFocus
)
{
f
.
unfocus
();
f
.
unfocus
();
}
}
...
@@ -694,8 +696,8 @@ class _LoginScreenState extends State<LoginScreen>
...
@@ -694,8 +696,8 @@ class _LoginScreenState extends State<LoginScreen>
],
],
),
),
),
),
// bottomNavigationBar: ,
),
),
// bottomNavigationBar: ,
),
),
);
);
},
},
...
...
lib/screens/ScannerLogin.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'package:qr_code_scanner/qr_code_scanner.dart'
;
import
'package:qr_code_scanner/qr_code_scanner.dart'
;
...
@@ -20,30 +22,32 @@ class _ScannerloginState extends State<Scannerlogin> {
...
@@ -20,30 +22,32 @@ class _ScannerloginState extends State<Scannerlogin> {
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"QR Login"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"QR Login"
),
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Spacer
(),
Spacer
(),
Container
(
Container
(
height:
250
,
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
context
);
provider
.
onQRViewCreated
(
p0
,
context
);
},
},
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderRadius:
20
,
borderLength:
60
,
borderLength:
60
,
...
@@ -64,7 +68,7 @@ class _ScannerloginState extends State<Scannerlogin> {
...
@@ -64,7 +68,7 @@ class _ScannerloginState extends State<Scannerlogin> {
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
),
Spacer
(),
Spacer
(),
SizedBox
(
height:
50
),
SizedBox
(
height:
50
),
],
],
),
),
...
...
lib/screens/UpdatePasswordScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
@@ -15,12 +17,14 @@ class UpdatePassword extends StatelessWidget {
...
@@ -15,12 +17,14 @@ class UpdatePassword extends StatelessWidget {
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Update Password"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
Container
(
appBar:
appbar
(
context
,
"Update Password"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
Column
(
child:
Column
(
children:
[
children:
[
Expanded
(
Expanded
(
...
@@ -51,7 +55,7 @@ class UpdatePassword extends StatelessWidget {
...
@@ -51,7 +55,7 @@ class UpdatePassword extends StatelessWidget {
),)),
),)),
SizedBox
(
height:
5
),
SizedBox
(
height:
5
),
_buildTextField
(
_buildTextField
(
controller:
provider
.
password
,
controller:
provider
.
password
,
hintText:
"New Password*"
,
hintText:
"New Password*"
,
errorText:
provider
.
passwordError
,
errorText:
provider
.
passwordError
,
...
@@ -121,7 +125,7 @@ class UpdatePassword extends StatelessWidget {
...
@@ -121,7 +125,7 @@ class UpdatePassword extends StatelessWidget {
?
CircularProgressIndicator
(
?
CircularProgressIndicator
(
color:
Colors
.
white
,
color:
Colors
.
white
,
padding:
EdgeInsets
.
all
(
7.5
),
padding:
EdgeInsets
.
all
(
7.5
),
)
)
:
Text
(
:
Text
(
"Update"
,
"Update"
,
...
...
lib/screens/WebERPIOS.dart
View file @
ecd8fcd1
...
@@ -85,10 +85,12 @@ class _WebERPIOSState extends State<WebERPIOS> {
...
@@ -85,10 +85,12 @@ class _WebERPIOSState extends State<WebERPIOS> {
}
}
return
true
;
// Allow default back button behavior
return
true
;
// Allow default back button behavior
},
},
child:
Scaffold
(
child:
SafeArea
(
appBar:
appbar
(
context
,
"ERP"
),
top:
false
,
body:
SafeArea
(
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Container
(
child:
Scaffold
(
appBar:
appbar
(
context
,
"ERP"
),
body:
Container
(
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Expanded
(
Expanded
(
...
@@ -129,7 +131,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
...
@@ -129,7 +131,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
allowsBackForwardNavigationGestures:
true
,
allowsBackForwardNavigationGestures:
true
,
),
),
),
),
androidOnPermissionRequest:
(
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
InAppWebViewController
controller
,
String
origin
,
String
origin
,
...
@@ -214,7 +216,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
...
@@ -214,7 +216,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
// }
// }
return
NavigationActionPolicy
.
ALLOW
;
return
NavigationActionPolicy
.
ALLOW
;
},
},
onLoadStart:
(
controller
,
url
)
{
onLoadStart:
(
controller
,
url
)
{
return
setState
(()
{
return
setState
(()
{
isLoading
=
true
;
isLoading
=
true
;
...
@@ -262,7 +264,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
...
@@ -262,7 +264,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
),
),
),
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
],
),
),
...
...
lib/screens/WebERPScreen.dart
View file @
ecd8fcd1
...
@@ -119,11 +119,13 @@ class _WebErpScreenState extends State<WebErpScreen> {
...
@@ -119,11 +119,13 @@ class _WebErpScreenState extends State<WebErpScreen> {
}
}
return
true
;
// Allow default back button behavior
return
true
;
// Allow default back button behavior
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"ERP"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
body:
SafeArea
(
child:
Scaffold
(
child:
Container
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"ERP"
),
body:
Container
(
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Expanded
(
Expanded
(
...
...
lib/screens/WebWhizzdomScreen.dart
View file @
ecd8fcd1
import
'dart:async'
;
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -77,11 +78,13 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -77,11 +78,13 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
}
}
return
true
;
// Allow default back button behavior
return
true
;
// Allow default back button behavior
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar
(
context
,
"Whizzdom"
),
bottom:
Platform
.
isIOS
?
false
:
true
,
body:
SafeArea
(
child:
Scaffold
(
child:
Container
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Whizzdom"
),
body:
Container
(
child:
Column
(
children:
<
Widget
>[
child:
Column
(
children:
<
Widget
>[
Expanded
(
Expanded
(
child:
Stack
(
child:
Stack
(
...
@@ -115,8 +118,8 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -115,8 +118,8 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
allowsInlineMediaPlayback:
true
,
allowsInlineMediaPlayback:
true
,
),
),
),
),
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
String
origin
,
List
<
String
>
resources
)
async
{
String
origin
,
List
<
String
>
resources
)
async
{
return
PermissionRequestResponse
(
return
PermissionRequestResponse
(
...
@@ -147,7 +150,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -147,7 +150,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
pullToRefreshController
?.
endRefreshing
();
pullToRefreshController
?.
endRefreshing
();
}
}
},
},
),
),
if
(
isLoading
)
...[
Container
(
if
(
isLoading
)
...[
Container
(
color:
Colors
.
white
.
withOpacity
(
0.7
),
color:
Colors
.
white
.
withOpacity
(
0.7
),
...
@@ -176,7 +179,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -176,7 +179,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
color:
AppColors
.
app_blue
),
color:
AppColors
.
app_blue
),
),
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
],
),
),
...
...
lib/screens/commom/accountLedger.dart
View file @
ecd8fcd1
This diff is collapsed.
Click to expand it.
lib/screens/commom/accountsList.dart
View file @
ecd8fcd1
This diff is collapsed.
Click to expand it.
lib/screens/commom/accountsListDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/accountDetailsProvider.dart'
;
import
'package:generp/Notifiers/commonProvider/accountDetailsProvider.dart'
;
...
@@ -48,33 +50,35 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
...
@@ -48,33 +50,35 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
overallBalance
=
totalDebit
-
totalCredit
;
overallBalance
=
totalDebit
-
totalCredit
;
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
SafeArea
(
appBar:
appbar2
(
top:
false
,
context
,
bottom:
Platform
.
isIOS
?
false
:
true
,
"Account Details"
,
child:
Scaffold
(
provider
.
resetValues
,
appBar:
appbar2
(
Container
(
context
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
"Account Details"
,
decoration:
BoxDecoration
(
provider
.
resetValues
,
color:
Color
(
0xFFE6F6FF
),
Container
(
borderRadius:
BorderRadius
.
circular
(
8
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
),
decoration:
BoxDecoration
(
child:
Row
(
color:
Color
(
0xFFE6F6FF
),
children:
[
borderRadius:
BorderRadius
.
circular
(
8
),
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
),
),
SizedBox
(
width:
5
),
child:
Row
(
Text
(
children:
[
overallBalance
.
toString
()
??
"-"
,
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
),
style:
TextStyle
(
fontSize:
12
),
SizedBox
(
width:
5
),
),
Text
(
],
overallBalance
.
toString
()
??
"-"
,
style:
TextStyle
(
fontSize:
12
),
),
],
),
),
),
),
),
),
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
body:
SafeArea
(
child:
SizedBox
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -528,7 +532,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
...
@@ -528,7 +532,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
),
),
),
),
),
),
]
]
],
],
),
),
),
),
...
...
lib/screens/commom/addCommonPayment.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -53,17 +55,19 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
...
@@ -53,17 +55,19 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
provider
.
resetValues
();
provider
.
resetValues
();
return
onBackPressed
(
context
);
return
onBackPressed
(
context
);
},
},
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
appBar:
appbar2
(
bottom:
Platform
.
isIOS
?
false
:
true
,
context
,
child:
Scaffold
(
"Add Account"
,
resizeToAvoidBottomInset:
true
,
provider
.
resetValues
,
appBar:
appbar2
(
SizedBox
(
width:
0
),
context
,
),
"Add Account"
,
backgroundColor:
AppColors
.
white
,
provider
.
resetValues
,
body:
SafeArea
(
SizedBox
(
width:
0
),
child:
SizedBox
(
),
backgroundColor:
AppColors
.
white
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -854,38 +858,38 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
...
@@ -854,38 +858,38 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
),
),
),
),
),
),
),
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
onTap:
provider
.
submitClickced
?
null
:
()
{
provider
.
submitClickced
=
true
;
provider
.
submitCommonAccountsAPI
(
context
,
widget
.
from
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClickced
provider
.
submitClickced
?
CircularProgressIndicator
.
adaptive
(
?
null
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
:
()
{
)
provider
.
submitClickced
=
true
;
:
Text
(
provider
.
submitCommonAccountsAPI
(
context
,
widget
.
from
);
"Submit"
,
},
style:
TextStyle
(
child:
Container
(
fontSize:
15
,
height:
45
,
fontFamily:
"JakartaMedium"
,
alignment:
Alignment
.
center
,
color:
Colors
.
white
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClickced
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
),
...
...
lib/screens/commom/commonDashboard.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/commonPagesProvider.dart'
;
import
'package:generp/Notifiers/commonProvider/commonPagesProvider.dart'
;
...
@@ -35,12 +37,14 @@ class _CommondashboardState extends State<Commondashboard> {
...
@@ -35,12 +37,14 @@ class _CommondashboardState extends State<Commondashboard> {
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
child:
SafeArea
(
resizeToAvoidBottomInset:
true
,
top:
false
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
bottom:
Platform
.
isIOS
?
false
:
true
,
appBar:
appbar
(
context
,
"Common"
),
child:
Scaffold
(
body:
SafeArea
(
resizeToAvoidBottomInset:
true
,
child:
GridView
.
builder
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Common"
),
body:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
itemCount:
gridPages
.
length
,
itemCount:
gridPages
.
length
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
...
@@ -89,35 +93,35 @@ class _CommondashboardState extends State<Commondashboard> {
...
@@ -89,35 +93,35 @@ class _CommondashboardState extends State<Commondashboard> {
);
);
},
},
),
),
)
,
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton
Location:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton
:
provider
.
accessPages
floatingActionButton:
provider
.
accessPages
.
any
((
page
)
=>
page
.
id
==
292
)?
InkResponse
(
.
any
((
page
)
=>
page
.
id
==
292
)?
InkResponse
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Dashboard"
,))
,
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Dashboard"
,)),
);
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
Text
(
child:
Text
(
"Add Account"
,
"Add Account"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
font
Size:
15
,
font
Family:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
color:
Colors
.
white
,
)
,
),
),
),
),
),
):
SizedBox
(
height:
0
,
),
):
SizedBox
(
height:
0
,
),
),
),
),
);
);
}
}
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment