Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
ecd8fcd1
Commit
ecd8fcd1
authored
Jul 07, 2025
by
Sai Srinivas
Browse files
07-07-2025 By Sai Srinivas
Pubspec and Safe Area.
parent
67ab0f3e
Changes
92
Hide whitespace changes
Inline
Side-by-side
lib/Notifiers/GeneratorDetailsProvider.dart
View file @
ecd8fcd1
...
...
@@ -278,7 +278,6 @@ class Generatordetailsprovider extends ChangeNotifier {
}
void
resetForm
()
{
_qrViewController
!.
dispose
();
engNoController
.
clear
();
_selectedComplaintType
=
null
;
_selectedCategoryType
=
null
;
...
...
@@ -289,6 +288,8 @@ class Generatordetailsprovider extends ChangeNotifier {
_selectedCategoryId
=
""
;
_selectedDescriptionId
=
""
;
_selectedDescription
=
""
;
_qrViewController
!.
dispose
();
}
initialFunction
(
from
)
async
{
...
...
lib/Notifiers/NearByGeneratorsProvider.dart
View file @
ecd8fcd1
...
...
@@ -130,7 +130,7 @@ set markers(List<Marker> value){
final
lat
=
_currentLocation
!.
latitude
;
final
lang
=
_currentLocation
!.
longitude
!;
_latlongs
=
'
$lat
,
$lang
'
;
LoadNearbyGeneratorsAPI
(
context
);
LoadNearbyGeneratorsAPI
(
context
,
_currentValue
);
}
}
...
...
@@ -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
)
{
print
(
"Invalid parameters: latlongs=
$_latlongs
, currentValue=
$_currentValue
"
);
return
;
...
...
@@ -231,6 +231,19 @@ set markers(List<Marker> value){
position:
_parseLatLng
(
generator
.
loc
),
icon:
BitmapDescriptor
.
fromBytes
(
resizedBytes
),
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}
"
,
snippet:
"Product Name:
${generator.productName}
"
,
...
...
@@ -238,16 +251,16 @@ set markers(List<Marker> value){
zIndex:
100
,
onTap:
()
{
int
index
=
generatorslist
.
indexWhere
(
(
techResponse
)
=>
techResponse
.
generatorId
==
generator
.
generatorId
,
);
onMarkerTap
(
context
,
"NearByGenerators"
,
generator
.
loc
,
generator
.
generatorId
,
);
//
int index = generatorslist.indexWhere(
//
(techResponse) =>
//
techResponse.generatorId == generator.generatorId,
//
);
//
onMarkerTap(
//
context,
//
"NearByGenerators",
//
generator.loc,
//
generator.generatorId,
//
);
// print("index:${index}");
// Navigator.push(
// context,
...
...
lib/Notifiers/crmProvider/crmNearbyOpenLeadsProvider.dart
View file @
ecd8fcd1
...
...
@@ -39,7 +39,6 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
Timer
?
_timer
;
File
?
_image
;
bool
_isLoading
=
true
;
String
_selectedItem
=
'Active'
;
double
_currentValue
=
1.0
;
Timer
?
_debounceTimer
;
...
...
@@ -59,17 +58,13 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
bool
get
isLoading
=>
_isLoading
;
Timer
?
get
timer
=>
_timer
;
File
?
get
image
=>
_image
;
String
get
selectedItem
=>
_selectedItem
;
double
get
currentValue
=>
_currentValue
;
set
currentValue
(
value
){
_currentValue
=
value
;
notifyListeners
();
}
set
selectedItem
(
String
value
){
_selectedItem
=
value
;
notifyListeners
();
}
set
markers
(
List
<
Marker
>
value
){
_markers
=
value
;
...
...
@@ -82,7 +77,6 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
void
resetAll
(){
_currentValue
=
1.0
;
_selectedItem
=
""
;
_markers
=
[];
_addresses
=
[];
}
...
...
@@ -128,7 +122,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
final
lat
=
_currentLocation
!.
latitude
;
final
lang
=
_currentLocation
!.
longitude
!;
_latlongs
=
'
$lat
,
$lang
'
;
LoadNearbyOpenLeadsAPI
(
context
);
LoadNearbyOpenLeadsAPI
(
context
,
_currentValue
);
}
}
...
...
@@ -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
)
{
print
(
"Invalid parameters: latlongs=
$_latlongs
, currentValue=
$_currentValue
"
);
return
;
...
...
@@ -155,7 +149,7 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
provider
.
empId
,
provider
.
session
,
_latlongs
,
_currentValue
radius
);
if
(
data
!=
null
)
{
...
...
@@ -223,6 +217,21 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
position:
_parseLatLng
(
leads
.
loc
),
icon:
BitmapDescriptor
.
fromBytes
(
resizedBytes
),
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}
"
,
snippet:
"Address:
${leads.address}
"
,
...
...
@@ -234,10 +243,10 @@ class crmNearbyOpenLeadsProvider extends ChangeNotifier {
(
techResponse
)
=>
techResponse
.
id
==
leads
.
id
,
);
onMarkerTap
(
context
,
leads
.
id
,
);
//
onMarkerTap(
//
context,
//
leads.id,
//
);
// print("index:${index}");
// Navigator.push(
// context,
...
...
lib/Notifiers/financeProvider/RequesitionLidtDetailsProvider.dart
View file @
ecd8fcd1
...
...
@@ -317,13 +317,18 @@ String? proposedAmountError;
}
catch
(
e
,
s
)
{}
}
String
?
remarksError
;
String
?
ApprovedAmountError
;
Future
<
void
>
paymentrequisitionRejectSubmitAPIFunction
(
context
,
mode
,
payment_request_id
,
approve_remarks
,)
async
{
try
{
if
(
approve_remarks
.
toString
().
trim
().
isEmpty
)
{
toast
(
context
,
"Enter Remarks"
);
remarksError
=
"Please Enter Remarks"
;
notifyListeners
();
// toast(context,"Enter Remarks");
return
;
}
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
...
...
@@ -362,6 +367,16 @@ String? proposedAmountError;
approve_remarks
,
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
.
error
==
"0"
)
{
paymentRequesitionDetails
(
context
,
payment_request_id
);
...
...
@@ -428,6 +443,8 @@ String? proposedAmountError;
_selectedValue
=
""
;
_selectedID
=
null
;
proposedAmountError
=
null
;
remarksError
=
null
;
ApprovedAmountError
=
null
;
checkDropDownReset
();
notifyListeners
();
...
...
lib/main.dart
View file @
ecd8fcd1
...
...
@@ -4,6 +4,7 @@ import 'package:firebase_core/firebase_core.dart';
import
'package:firebase_messaging/firebase_messaging.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_local_notifications/flutter_local_notifications.dart'
;
import
'package:flutter_ringtone_player/flutter_ringtone_player.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
...
@@ -149,6 +150,8 @@ class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget
build
(
BuildContext
context
)
{
// SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription());
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
edgeToEdge
);
FirebaseMessaging
.
onMessageOpenedApp
.
listen
((
RemoteMessage
message
)
{
String
type
=
message
.
data
[
'type'
]
??
''
;
String
redirectUrl
=
message
.
data
[
'redirect_url'
]
??
''
;
...
...
@@ -293,6 +296,7 @@ class MyApp extends StatelessWidget {
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
),
),
useMaterial3:
true
// inputDecorationTheme: InputDecorationTheme(
// hintStyle: TextStyle(
// fontWeight: FontWeight.w400,
...
...
lib/screens/AttendanceScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/screens/notifierExports.dart'
;
...
...
@@ -102,650 +104,654 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
},
child:
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Attendance"
),
body:
SafeArea
(
child:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
15
,
bottom:
15
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
left:
15
,
right:
10
,
top:
15
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
"Check-in"
)),
Expanded
(
child:
Text
(
"Check-out"
)),
],
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Attendance"
),
body:
SafeArea
(
child:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
15
,
bottom:
15
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
left:
15
,
right:
10
,
top:
15
,
),
child:
Row
(
children:
[
Expanded
(
child:
Text
(
"Check-in"
)),
Expanded
(
child:
Text
(
"Check-out"
)),
],
),
),
),
SizedBox
(
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
SizedBox
(
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime
,
style:
TextStyle
(
color:
formattedTime
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime
,
style:
TextStyle
(
color:
formattedTime
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
),
),
),
TextSpan
(
text:
period
,
style:
TextStyle
(
color:
period
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
TextSpan
(
text:
period
,
style:
TextStyle
(
color:
period
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
)
,
),
)
,
]
,
]
,
)
,
),
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_in_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_in_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
)
,
]
,
]
,
)
,
),
),
),
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime2
,
style:
TextStyle
(
color:
formattedTime2
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
16
,
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
formattedTime2
,
style:
TextStyle
(
color:
formattedTime2
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
),
),
),
TextSpan
(
text:
period2
,
style:
TextStyle
(
color:
period2
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
TextSpan
(
text:
period2
,
style:
TextStyle
(
color:
period2
!=
"-"
?
Color
(
0xFF493272
):
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
)
,
),
)
,
]
,
]
,
)
,
),
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_out_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
Text
(
"
${attendance.attendanceHistory.firstOrNull?['check_out_location']}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
)
,
]
,
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
],
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Text
(
"Attendance Details"
,
style:
TextStyle
(
fontFamily:
"JakartaSemiBold"
,
fontSize:
14
,
color:
Color
(
0xFF818181
),
],
),
),
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Text
(
"Attendance Details"
,
style:
TextStyle
(
fontFamily:
"JakartaSemiBold"
,
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
child:
GridView
.
builder
(
itemCount:
4
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
20
/
10
,
),
itemBuilder:
(
context
,
index
)
{
final
numbers
=
[
attendance
.
presentDays
,
attendance
.
absentDays
,
attendance
.
holidays
,
attendance
.
latePenalties
,
];
final
names
=
[
"Present Days"
,
"Absent Days"
,
"Holidays"
,
"Late Points"
,
];
final
colors
=
[
0xFFE7FFE5
,
0xFFFFEFEF
,
0xFFF3EDFF
,
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFFFF0000
,
0xFF493272
,
0xFF91481B
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
decoration:
BoxDecoration
(
color:
Color
(
colors
[
index
]),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
numbers
[
index
].
toString
(),
style:
TextStyle
(
fontSize:
30
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
textcolors
[
index
]),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
GridView
.
builder
(
itemCount:
4
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
20
/
10
,
),
itemBuilder:
(
context
,
index
)
{
final
numbers
=
[
attendance
.
presentDays
,
attendance
.
absentDays
,
attendance
.
holidays
,
attendance
.
latePenalties
,
];
final
names
=
[
"Present Days"
,
"Absent Days"
,
"Holidays"
,
"Late Points"
,
];
final
colors
=
[
0xFFE7FFE5
,
0xFFFFEFEF
,
0xFFF3EDFF
,
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFFFF0000
,
0xFF493272
,
0xFF91481B
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
decoration:
BoxDecoration
(
color:
Color
(
colors
[
index
]),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
numbers
[
index
].
toString
(),
style:
TextStyle
(
fontSize:
30
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
textcolors
[
index
]),
),
),
),
Text
(
names
[
index
],
style:
TextStyle
(
color:
Color
(
0xFF818181
),
Text
(
names
[
index
],
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
)
,
]
,
)
,
);
}
,
]
,
)
,
)
;
},
)
,
),
),
///calendar
Container
(
// padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
child:
Column
(
children:
[
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
10
,
30
,
0
,
),
child:
Container
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
SizedBox
(
child:
Row
(
children:
[
GestureDetector
(
onTap:
()
{
attendance
.
setPreviousMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_left.svg"
,
///calendar
Container
(
// padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
),
child:
Column
(
children:
[
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
10
,
30
,
0
,
),
child:
Container
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
SizedBox
(
child:
Row
(
children:
[
GestureDetector
(
onTap:
()
{
attendance
.
setPreviousMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_left.svg"
,
),
),
),
Text
(
monthLabel
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
),
Text
(
monthLabel
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
)
,
),
),
),
GestureDetector
(
onTap:
()
{
attendance
.
setNextMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
GestureDetector
(
onTap:
()
{
attendance
.
setNextMonth
(
homeProvider
,
context
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
)
,
),
)
,
]
,
]
,
)
,
),
),
InkResponse
(
onTap:
()
{
_showInfoBottomSheet
(
context
);
},
child:
SizedBox
(
width:
20
,
height:
20
,
child:
SvgPicture
.
asset
(
"assets/svg/ic_info_new.svg"
,
InkResponse
(
onTap:
()
{
_showInfoBottomSheet
(
context
);
},
child:
SizedBox
(
width:
20
,
height:
20
,
child:
SvgPicture
.
asset
(
"assets/svg/ic_info_new.svg"
,
width:
20
,
height:
20
,
),
),
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
height:
5
),
P
adding
(
padding
:
c
on
st
EdgeInsets
.
fromLTRB
(
8
,
10
,
8
,
0
),
child:
Container
(
child
:
Row
(
children:
[
for
(
var
i
=
0
;
i
<
[
'S
'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S'
,
].
length
;
i
++
)
Expanded
(
child:
Text
(
[
'S
'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S'
,
][
i
]
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
color:
i
==
0
?
Color
(
0xFFFF0000
)
:
AppColors
.
semi_black
,
SizedBox
(
height:
5
),
Padding
(
p
adding
:
const
EdgeInsets
.
fromLTRB
(
8
,
10
,
8
,
0
),
child
:
C
on
tainer
(
child:
Row
(
child
ren:
[
for
(
var
i
=
0
;
i
<
[
'S'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S
'
,
].
length
;
i
++
)
Expanded
(
child:
Text
(
[
'S'
,
'M
'
,
'T
'
,
'W
'
,
'T
'
,
'F
'
,
'S
'
,
][
i
]
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
color:
i
==
0
?
Color
(
0xFFFF0000
)
:
AppColors
.
semi_black
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
10
),
child:
Container
(
child:
GridView
.
builder
(
itemCount:
daysInPeriod
+
startingIndex
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
7
,
crossAxisSpacing:
2
,
mainAxisSpacing:
1
,
childAspectRatio:
(
255
/
245
),
),
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
,
),
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
index
<
startingIndex
)
{
return
SizedBox
.
shrink
();
}
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
10
),
child:
Container
(
child:
GridView
.
builder
(
itemCount:
daysInPeriod
+
startingIndex
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
7
,
crossAxisSpacing:
2
,
mainAxisSpacing:
1
,
childAspectRatio:
(
255
/
245
),
),
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
,
),
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
index
<
startingIndex
)
{
return
SizedBox
.
shrink
();
}
final
dayIndex
=
index
-
startingIndex
;
final
currentDateInPeriod
=
startDate
.
add
(
Duration
(
days:
dayIndex
),
);
final
currentDay
=
currentDateInPeriod
.
day
;
final
isFutureDate
=
currentDateInPeriod
.
isAfter
(
currentDate
);
final
dayIndex
=
index
-
startingIndex
;
final
currentDateInPeriod
=
startDate
.
add
(
Duration
(
days:
dayIndex
),
);
final
currentDay
=
currentDateInPeriod
.
day
;
final
isFutureDate
=
currentDateInPeriod
.
isAfter
(
currentDate
);
// Find matching date in dateArrayList
Map
<
String
,
dynamic
>?
dateMap
;
try
{
dateMap
=
dateArrayList
[
dayIndex
];
}
catch
(
e
)
{
dateMap
=
{};
}
// Find matching date in dateArrayList
Map
<
String
,
dynamic
>?
dateMap
;
try
{
dateMap
=
dateArrayList
[
dayIndex
];
}
catch
(
e
)
{
dateMap
=
{};
}
// Find matching penalty
Map
<
String
,
dynamic
>?
penaltyMap
;
try
{
penaltyMap
=
penalityArrayList
[
dayIndex
];
}
catch
(
e
)
{
penaltyMap
=
{};
}
// Find matching penalty
Map
<
String
,
dynamic
>?
penaltyMap
;
try
{
penaltyMap
=
penalityArrayList
[
dayIndex
];
}
catch
(
e
)
{
penaltyMap
=
{};
}
String
?
dateColor
=
dateMap
.
isNotEmpty
?
dateMap
.
values
.
first
:
null
;
String
?
penaltyKey
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
keys
.
first
:
null
;
int
?
datePenalty
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
values
.
first
:
0
;
String
?
dateColor
=
dateMap
.
isNotEmpty
?
dateMap
.
values
.
first
:
null
;
String
?
penaltyKey
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
keys
.
first
:
null
;
int
?
datePenalty
=
penaltyMap
.
isNotEmpty
?
penaltyMap
.
values
.
first
:
0
;
// Determine if this is the current day
final
isCurrentDay
=
currentDateInPeriod
.
day
==
currentDate
.
day
&&
currentDateInPeriod
.
month
==
currentDate
.
month
&&
currentDateInPeriod
.
year
==
currentDate
.
year
;
// Determine if this is the current day
final
isCurrentDay
=
currentDateInPeriod
.
day
==
currentDate
.
day
&&
currentDateInPeriod
.
month
==
currentDate
.
month
&&
currentDateInPeriod
.
year
==
currentDate
.
year
;
return
InkWell
(
onTap:
isFutureDate
?
null
:
()
{
selectedIndex
=
index
;
if
(
penaltyKey
!=
null
)
{
attendance
.
dateWiseAttendance
(
homeProvider
,
penaltyKey
,
context
,
);
}
attendance
.
selectedDate
=
currentDay
.
toString
();
_showAttDetailsBottomSheet
(
context
,
);
},
child:
Card
(
elevation:
0
,
child:
Column
(
children:
[
// Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Text(
// "($datePenalty)",
// style: TextStyle(
// fontWeight: FontWeight.w400,
// color: Colors.black,
// fontSize: 5
// ),
// ),
// ],
// ),
Center
(
child:
Container
(
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
border:
Border
.
all
(
color:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFF1487C9
,
)
:
Colors
.
transparent
,
),
color:
isFutureDate
?
Colors
.
transparent
:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFFFFFFFF
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
).
withAlpha
(
50
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
).
withAlpha
(
50
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
).
withAlpha
(
50
)
:
dateColor
==
'br'
?
Color
(
0xFFFFE8D0
)
:
dateColor
==
'y'
?
Color
(
0xFFFFF9B2
)
:
Colors
.
transparent
,
),
child:
Center
(
child:
Text
(
currentDay
.
toString
(),
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
return
InkWell
(
onTap:
isFutureDate
?
null
:
()
{
selectedIndex
=
index
;
if
(
penaltyKey
!=
null
)
{
attendance
.
dateWiseAttendance
(
homeProvider
,
penaltyKey
,
context
,
);
}
attendance
.
selectedDate
=
currentDay
.
toString
();
_showAttDetailsBottomSheet
(
context
,
);
},
child:
Card
(
elevation:
0
,
child:
Column
(
children:
[
// Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Text(
// "($datePenalty)",
// style: TextStyle(
// fontWeight: FontWeight.w400,
// color: Colors.black,
// fontSize: 5
// ),
// ),
// ],
// ),
Center
(
child:
Container
(
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
border:
Border
.
all
(
color:
isFutureDate
?
AppColors
.
semi_black
:
(
isCurrentDay
||
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFF2D2D2D
,
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
)
:
dateColor
==
'br'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'y'
?
Color
(
0xFF605C00
,
0xFF1487C9
,
)
:
Colors
.
transparent
,
),
color:
isFutureDate
?
Colors
.
transparent
:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFFFFFFFF
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
).
withAlpha
(
50
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
).
withAlpha
(
50
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
).
withAlpha
(
50
)
:
dateColor
==
'br'
?
Color
(
0xFFFFE8D0
)
:
dateColor
==
'y'
?
Color
(
0xFFFFF9B2
)
:
Colors
.
transparent
,
),
child:
Center
(
child:
Text
(
currentDay
.
toString
(),
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w400
,
color:
isFutureDate
?
AppColors
.
semi_black
:
(
isCurrentDay
||
(
selectedIndex
==
index
))
?
Color
(
0xFF2D2D2D
,
)
:
dateColor
==
'g'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'r'
?
Color
(
0xFFFF0000
,
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
)
:
dateColor
==
'br'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'y'
?
Color
(
0xFF605C00
,
)
:
Colors
.
transparent
,
),
),
),
),
),
)
,
]
,
]
,
)
,
),
)
,
);
}
,
)
;
},
)
,
),
),
)
,
]
,
]
,
)
,
),
),
SizedBox
(
height:
70
)
,
]
,
SizedBox
(
height:
70
),
]
,
)
,
),
),
),
),
floatingActionButton:
attendance
.
attendanceStatus
==
0
||
attendance
.
attendanceStatus
==
1
?
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
CheckInOutScreen
(
getAttendanceStatus:
attendance
.
attendanceStatus
,
),
),
);
if
(
res
==
true
)
{
attendance
.
getAttendanceList
(
homeProvider
,
context
,
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
loadAttendanceDetails
(
homeProvider
,
floatingActionButton:
attendance
.
attendanceStatus
==
0
||
attendance
.
attendanceStatus
==
1
?
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
CheckInOutScreen
(
getAttendanceStatus:
attendance
.
attendanceStatus
,
),
),
);
}
if
(
res
==
true
)
{
attendance
.
getAttendanceList
(
homeProvider
,
context
,
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
loadAttendanceDetails
(
homeProvider
,
context
,
);
}
var
f
=
FocusScope
.
of
(
context
);
if
(!
f
.
hasPrimaryFocus
)
{
f
.
unfocus
();
}
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Center
(
child:
Text
(
attendance
.
attendanceStatus
==
0
?
"Check In"
:
"Check Out"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
16
,
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
var
f
=
FocusScope
.
of
(
context
);
if
(!
f
.
hasPrimaryFocus
)
{
f
.
unfocus
();
}
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Center
(
child:
Text
(
attendance
.
attendanceStatus
==
0
?
"Check In"
:
"Check Out"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
16
,
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
)
,
)
:
SizedBox
(
height:
0
),
f
loatingActionButtonLocation
:
FloatingActionButtonLocation
.
centerFloat
,
)
:
SizedBox
(
height:
0
),
floatingActionButtonLocation:
F
loatingActionButtonLocation
.
centerFloat
,
)
,
),
),
);
...
...
lib/screens/CheckInScreen.dart
View file @
ecd8fcd1
...
...
@@ -50,11 +50,13 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
onWillPop:
()
{
provider
.
dispose
();
return
onBackPressed
(
context
);},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
getAttendanceStatus
==
0
?
"Check In"
:
"Check Out"
,
provider
.
dispose
,
SizedBox
(
width:
0
,)),
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
getAttendanceStatus
==
0
?
"Check In"
:
"Check Out"
,
provider
.
dispose
,
SizedBox
(
width:
0
,)),
body:
Container
(
child:
SafeArea
(
child:
Column
(
children:
[
...
...
lib/screens/FrontCameraCapture.dart
View file @
ecd8fcd1
...
...
@@ -80,60 +80,61 @@ class _CheckOutScreenState extends State<FrontCameraCapture> {
Widget
build
(
BuildContext
context
)
{
Size
size
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
// appBar: AppBar(automaticallyImplyLeading: false),
body:
SafeArea
(
child:
isLoading
?
Center
(
child:
CircularProgressIndicator
())
:
Row
(
children:
[
Expanded
(
child:
SizedBox
(
height:
double
.
infinity
,
child:
cam_controller
.
value
.
isInitialized
?
Transform
(
alignment:
Alignment
.
center
,
transform:
Matrix4
.
rotationY
(
math
.
pi
),
child:
CameraPreview
(
cam_controller
,
child:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
GestureDetector
(
onTap:
()
async
{
if
(!
cam_controller
.
value
.
isInitialized
)
return
;
final
image
=
await
cam_controller
.
takePicture
();
_image
=
File
(
image
.
path
);
Navigator
.
pop
(
context
,
_image
);
},
child:
Container
(
height:
100
,
width:
double
.
infinity
,
padding:
EdgeInsets
.
all
(
10
),
decoration:
BoxDecoration
(
color:
Colors
.
black26
),
child:
Center
(
child:
SvgPicture
.
asset
(
"assets/svg/check_in_cam.svg"
,
width:
50
,
height:
50
,)
),
),
return
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
// appBar: AppBar(automaticallyImplyLeading: false),
body:
isLoading
?
Center
(
child:
CircularProgressIndicator
())
:
Row
(
children:
[
Expanded
(
child:
SizedBox
(
height:
double
.
infinity
,
child:
cam_controller
.
value
.
isInitialized
?
Transform
(
alignment:
Alignment
.
center
,
transform:
Matrix4
.
rotationY
(
math
.
pi
),
child:
CameraPreview
(
cam_controller
,
child:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
GestureDetector
(
onTap:
()
async
{
if
(!
cam_controller
.
value
.
isInitialized
)
return
;
final
image
=
await
cam_controller
.
takePicture
();
_image
=
File
(
image
.
path
);
Navigator
.
pop
(
context
,
_image
);
},
child:
Container
(
height:
100
,
width:
double
.
infinity
,
padding:
EdgeInsets
.
all
(
10
),
decoration:
BoxDecoration
(
color:
Colors
.
black26
),
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> {
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
homescreen
.
DashboardApiFunction
(
context
);
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
Column
(
children:
[
Expanded
(
...
...
lib/screens/LoginScreen.dart
View file @
ecd8fcd1
...
...
@@ -157,11 +157,13 @@ class _LoginScreenState extends State<LoginScreen>
builder:
(
context
,
loginProv
,
child
)
{
return
WillPopScope
(
onWillPop:
onBackPressed
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
KeyboardVisibilityProvider
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
KeyboardVisibilityProvider
(
controller:
_keyboardVisibilityController
,
child:
Stack
(
alignment:
Alignment
.
center
,
...
...
@@ -486,7 +488,7 @@ class _LoginScreenState extends State<LoginScreen>
password
.
text
,
);
var
f
=
FocusScope
.
of
(
context
);
if
(!
f
.
hasPrimaryFocus
)
{
f
.
unfocus
();
}
...
...
@@ -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:provider/provider.dart'
;
import
'package:qr_code_scanner/qr_code_scanner.dart'
;
...
...
@@ -20,30 +22,32 @@ class _ScannerloginState extends State<Scannerlogin> {
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"QR Login"
),
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"QR Login"
),
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
children:
[
Spacer
(),
Container
(
height:
250
,
child:
QRView
(
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
context
);
},
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderLength:
60
,
...
...
@@ -64,7 +68,7 @@ class _ScannerloginState extends State<Scannerlogin> {
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
white
),
),
Spacer
(),
SizedBox
(
height:
50
),
],
),
...
...
lib/screens/UpdatePasswordScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -15,12 +17,14 @@ class UpdatePassword extends StatelessWidget {
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Update Password"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Update Password"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
Column
(
children:
[
Expanded
(
...
...
@@ -51,7 +55,7 @@ class UpdatePassword extends StatelessWidget {
),)),
SizedBox
(
height:
5
),
_buildTextField
(
controller:
provider
.
password
,
hintText:
"New Password*"
,
errorText:
provider
.
passwordError
,
...
...
@@ -121,7 +125,7 @@ class UpdatePassword extends StatelessWidget {
?
CircularProgressIndicator
(
color:
Colors
.
white
,
padding:
EdgeInsets
.
all
(
7.5
),
)
:
Text
(
"Update"
,
...
...
lib/screens/WebERPIOS.dart
View file @
ecd8fcd1
...
...
@@ -85,10 +85,12 @@ class _WebERPIOSState extends State<WebERPIOS> {
}
return
true
;
// Allow default back button behavior
},
child:
Scaffold
(
appBar:
appbar
(
context
,
"ERP"
),
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
appBar:
appbar
(
context
,
"ERP"
),
body:
Container
(
child:
Column
(
children:
<
Widget
>[
Expanded
(
...
...
@@ -129,7 +131,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
allowsBackForwardNavigationGestures:
true
,
),
),
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
String
origin
,
...
...
@@ -214,7 +216,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
// }
return
NavigationActionPolicy
.
ALLOW
;
},
onLoadStart:
(
controller
,
url
)
{
return
setState
(()
{
isLoading
=
true
;
...
...
@@ -262,7 +264,7 @@ class _WebERPIOSState extends State<WebERPIOS> {
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
),
...
...
lib/screens/WebERPScreen.dart
View file @
ecd8fcd1
...
...
@@ -119,11 +119,13 @@ class _WebErpScreenState extends State<WebErpScreen> {
}
return
true
;
// Allow default back button behavior
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"ERP"
),
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"ERP"
),
body:
Container
(
child:
Column
(
children:
<
Widget
>[
Expanded
(
...
...
lib/screens/WebWhizzdomScreen.dart
View file @
ecd8fcd1
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -77,11 +78,13 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
}
return
true
;
// Allow default back button behavior
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Whizzdom"
),
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Whizzdom"
),
body:
Container
(
child:
Column
(
children:
<
Widget
>[
Expanded
(
child:
Stack
(
...
...
@@ -115,8 +118,8 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
allowsInlineMediaPlayback:
true
,
),
),
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
String
origin
,
List
<
String
>
resources
)
async
{
return
PermissionRequestResponse
(
...
...
@@ -147,7 +150,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
pullToRefreshController
?.
endRefreshing
();
}
},
),
if
(
isLoading
)
...[
Container
(
color:
Colors
.
white
.
withOpacity
(
0.7
),
...
...
@@ -176,7 +179,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
color:
AppColors
.
app_blue
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
),
...
...
lib/screens/commom/accountLedger.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:auto_size_text/auto_size_text.dart'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -96,470 +98,474 @@ class _AccountledgerState extends State<Accountledger> {
totalValues
=
[...
values
,
...
values2
];
}
return
WillPopScope
(
child:
S
c
af
fold
(
resizeToAvoidBottomInset:
tru
e
,
appBar:
appbar2
(
context
,
"Account Ledger List"
,
provider
.
resetAll
,
Row
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
child:
Saf
eArea
(
top:
fals
e
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Account Ledger List"
,
provider
.
resetAll
,
Row
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
decoration:
BoxDecoration
(
),
child:
Row
(
children:
[
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
,),
SizedBox
(
width:
5
,),
Text
(
"
${provider.balanceDetails.balance.toString()}
"
??
"-"
,
style:
TextStyle
(
fontSize:
12
,
),)
],
),
),
SizedBox
(
width:
10
,),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
child:
GestureDetector
(
onTap:
()
{
print
(
"Tapped"
);
),
child:
Row
(
children:
[
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
,),
SizedBox
(
width:
5
,),
Text
(
"
${provider.balanceDetails.balance.toString()}
"
??
"-"
,
style:
TextStyle
(
fontSize:
12
,
),)
],
),
),
SizedBox
(
width:
10
,),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/search_ic.svg"
,
height:
25
),
),
),
],
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
)):
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
child:
GestureDetector
(
onTap:
()
{
print
(
"Tapped"
);
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
"
${provider.selectedAcVal??""}
"
+
" "
+
"Account Ledger List"
),
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/search_ic.svg"
,
height:
25
),
),
),
if
(
provider
.
ledgerList
.
isEmpty
)...[
Emptywidget
(
context
),
]
else
...[
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFEFEF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
AutoSizeText
(
"
${provider.balanceDetails.totalCredit}
"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
20
,
],
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
)):
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
"
${provider.selectedAcVal??""}
"
+
" "
+
"Account Ledger List"
),
),
if
(
provider
.
ledgerList
.
isEmpty
)...[
Emptywidget
(
context
),
]
else
...[
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFEFEF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
AutoSizeText
(
"
${provider.balanceDetails.totalCredit}
"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
20
,
),
minFontSize:
20
,
maxFontSize:
25
,
),
minFontSize:
20
,
maxFontSize:
25
,
),
Text
(
"credit"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
Text
(
"credit"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
),
),
),
),
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFEFEF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
AutoSizeText
(
"
${provider.balanceDetails.totalDebit}
"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
20
,
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFEFEF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
AutoSizeText
(
"
${provider.balanceDetails.totalDebit}
"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
20
,
),
minFontSize:
20
,
maxFontSize:
25
,
),
minFontSize:
20
,
maxFontSize:
25
,
),
Text
(
"debit"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
Text
(
"debit"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
),
),
),
)
,
]
,
]
,
)
,
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
child:
Text
(
"Account Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
child:
Text
(
"Account Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
),
),
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
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
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
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
...
List
.
generate
(
totalHeadings
.
length
,
(
index
)
{
...
List
.
generate
(
totalHeadings
.
length
,
(
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
child:
Row
(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start,
children:
[
Expanded
(
child:
Text
(
"
${totalHeadings[index]}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
child:
Row
(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start,
children:
[
Expanded
(
child:
Text
(
"
${totalHeadings[index]}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
),
),
Expanded
(
child:
Text
(
"
${totalValues[index]}
"
,
Expanded
(
child:
Text
(
"
${totalValues[index]}
"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
],
),
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
],
),
),
),
)
,
]
,
]
,
)
,
),
),
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
()
,
shrinkWrap:
true
,
item
Count:
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
(
padd
in
g
:
EdgeInsets
.
symmetric
(
vertic
al:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Column
(
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
bottom:
5
),
child:
Text
(
date
,
style:
TextStyle
(
font
Size:
14
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
groupedData
.
keys
.
length
,
item
Builder:
(
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
),
marg
in:
EdgeInsets
.
symmetric
(
horizont
al:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
childr
en:
[
Container
(
padding:
EdgeInsets
.
only
(
bottom:
5
),
child:
Text
(
date
,
style:
TextStyle
(
fontSize:
14
,
font
Family:
"JakartaMedium"
,
color:
Color
(
0xFF818181
)
,
),
),
),
),
...
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
);
}
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
,
),
),
],
...
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
);
}
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"
?
"-"
:
"+"
,
Text
(
item
.
description
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
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"
,
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,
// ),
// ),
// ),
// ],
// ),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Transactiondetails(
paymentID: item.refId,
type: item.type,
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
",
),
),
],
),
),
),
),
);
},
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,
],
),
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,
// ),
// ),
// ),
// ],
// ),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Transactiondetails(
paymentID: item.refId,
type: item.type,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"
assets
/
svg
/
next_button
.
svg
",
),
],
);
},
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(),
],
),
);
},
),
],
],
],
),
),
),
)
),
),
),
onWillPop: () {
return _onBackPressed(context);
...
...
lib/screens/commom/accountsList.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -55,251 +57,252 @@ class _AccountslistState extends State<Accountslist> {
var
accountList
=
provider
.
accountsList
;
print
(
accountList
.
length
);
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Account List"
,
provider
.
resetValues
,
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Account List"
,
provider
.
resetValues
,
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
child:
InkResponse
(
onTap:
()
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
18
,
child:
InkResponse
(
onTap:
()
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
18
,
),
),
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
),
)
:
accountList
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
SingleChildScrollView
(
controller:
scrollController
,
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
accountList
.
length
+
(
provider
.
hasMoreData
&&
provider
.
isLoading
?
1
:
0
),
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
accountList
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
if
(
index
==
accountList
.
length
&&
!
provider
.
isLoading
)
{
return
Padding
(
padding:
EdgeInsets
.
all
(
8.0
),
child:
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
),
)
:
accountList
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
SingleChildScrollView
(
controller:
scrollController
,
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
accountList
.
length
+
(
provider
.
hasMoreData
&&
provider
.
isLoading
?
1
:
0
),
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
accountList
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
if
(
index
==
accountList
.
length
&&
!
provider
.
isLoading
)
{
return
Padding
(
padding:
EdgeInsets
.
all
(
8.0
),
child:
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
),
);
}
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
(
0xFFEAF7FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/common_ac_list_ic.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
accountList
[
index
].
name
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
accountList
[
index
]
.
contactName
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
);
}
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
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
child:
Column
(
children:
[
Row
(
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Mobile Number"
,
"Email Id"
,
"Address"
,
"Account Type"
,
];
final
subHeadings
=
[
accountList
[
index
].
mob1
??
"-"
,
accountList
[
index
].
email
??
"-"
,
accountList
[
index
].
address
??
"-"
,
accountList
[
index
].
type
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFEAF7FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/common_ac_list_ic.svg"
,
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
SizedBox
(
width:
1
0
),
SizedBox
(
width:
1
5
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
accountList
[
index
].
name
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
accountList
[
index
]
.
contactName
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Mobile Number"
,
"Email Id"
,
"Address"
,
"Account Type"
,
];
final
subHeadings
=
[
accountList
[
index
].
mob1
??
"-"
,
accountList
[
index
].
email
??
"-"
,
accountList
[
index
].
address
??
"-"
,
accountList
[
index
].
type
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
SizedBox
(
width:
15
),
Expanded
(
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
);
}),
InkResponse
(
onTap:
()
async
{
print
(
"length,
${accountList.length}
"
,
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
accountList
[
index
]
.
id
,
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
print
(
"length,
${accountList.length}
"
,
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
accountList
[
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
,
),
);
},
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"
,
),
],
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
)
,
]
,
),
]
,
)
,
),
);
}
,
)
,
]
,
],
)
,
)
;
}
,
),
)
,
]
,
),
)
:
Emptywidget
(
context
),
),
),
)
:
Emptywidget
(
context
),
),
),
onWillPop:
()
{
...
...
lib/screens/commom/accountsListDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/accountDetailsProvider.dart'
;
...
...
@@ -48,33 +50,35 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
overallBalance
=
totalDebit
-
totalCredit
;
return
WillPopScope
(
child:
Scaffold
(
appBar:
appbar2
(
context
,
"Account Details"
,
provider
.
resetValues
,
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
Row
(
children:
[
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
),
SizedBox
(
width:
5
),
Text
(
overallBalance
.
toString
()
??
"-"
,
style:
TextStyle
(
fontSize:
12
),
),
],
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
appBar:
appbar2
(
context
,
"Account Details"
,
provider
.
resetValues
,
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
Row
(
children:
[
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
),
SizedBox
(
width:
5
),
Text
(
overallBalance
.
toString
()
??
"-"
,
style:
TextStyle
(
fontSize:
12
),
),
],
),
),
),
),
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -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:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -53,17 +55,19 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
provider
.
resetValues
();
return
onBackPressed
(
context
);
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Add Account"
,
provider
.
resetValues
,
SizedBox
(
width:
0
),
),
backgroundColor:
AppColors
.
white
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Add Account"
,
provider
.
resetValues
,
SizedBox
(
width:
0
),
),
backgroundColor:
AppColors
.
white
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -854,38 +858,38 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
),
),
),
),
bottomNavigationBar:
InkResponse
(
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:
bottomNavigationBar:
InkResponse
(
onTap:
provider
.
submitClickced
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
?
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
?
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_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/commonPagesProvider.dart'
;
...
...
@@ -35,12 +37,14 @@ class _CommondashboardState extends State<Commondashboard> {
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Common"
),
body:
SafeArea
(
child:
GridView
.
builder
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Common"
),
body:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
itemCount:
gridPages
.
length
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
...
...
@@ -89,35 +93,35 @@ class _CommondashboardState extends State<Commondashboard> {
);
},
),
)
,
floatingActionButton
Location:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
provider
.
accessPages
.
any
((
page
)
=>
page
.
id
==
292
)?
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Dashboard"
,)),
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
Text
(
"Add Account"
,
style:
TextStyle
(
font
Size:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton
:
provider
.
accessPages
.
any
((
page
)
=>
page
.
id
==
292
)?
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Dashboard"
,))
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
),
child:
Text
(
"Add Account"
,
style:
TextStyle
(
fontSize:
15
,
font
Family:
"JakartaMedium"
,
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