Commit e2ab261a authored by Sai Srinivas's avatar Sai Srinivas
Browse files

pub

parent c118578f
...@@ -7,6 +7,40 @@ PODS: ...@@ -7,6 +7,40 @@ PODS:
- Flutter - Flutter
- device_info_plus (0.0.1): - device_info_plus (0.0.1):
- Flutter - Flutter
- DKImagePickerController/Core (4.3.9):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.9)
- DKImagePickerController/PhotoGallery (4.3.9):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.3.9)
- DKPhotoGallery (0.0.19):
- DKPhotoGallery/Core (= 0.0.19)
- DKPhotoGallery/Model (= 0.0.19)
- DKPhotoGallery/Preview (= 0.0.19)
- DKPhotoGallery/Resource (= 0.0.19)
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Core (0.0.19):
- DKPhotoGallery/Model
- DKPhotoGallery/Preview
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Model (0.0.19):
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Preview (0.0.19):
- DKPhotoGallery/Model
- DKPhotoGallery/Resource
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Resource (0.0.19):
- SDWebImage
- SwiftyGif
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Firebase/CoreOnly (11.10.0): - Firebase/CoreOnly (11.10.0):
- FirebaseCore (~> 11.10.0) - FirebaseCore (~> 11.10.0)
- Firebase/Messaging (11.10.0): - Firebase/Messaging (11.10.0):
...@@ -160,6 +194,7 @@ PODS: ...@@ -160,6 +194,7 @@ PODS:
- sqflite_darwin (0.0.4): - sqflite_darwin (0.0.4):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- SwiftyGif (5.4.5)
- syncfusion_flutter_pdfviewer (0.0.1): - syncfusion_flutter_pdfviewer (0.0.1):
- Flutter - Flutter
- url_launcher_ios (0.0.1): - url_launcher_ios (0.0.1):
...@@ -173,6 +208,7 @@ DEPENDENCIES: ...@@ -173,6 +208,7 @@ DEPENDENCIES:
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`) - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
...@@ -203,6 +239,8 @@ DEPENDENCIES: ...@@ -203,6 +239,8 @@ DEPENDENCIES:
SPEC REPOS: SPEC REPOS:
trunk: trunk:
- DKImagePickerController
- DKPhotoGallery
- Firebase - Firebase
- FirebaseCore - FirebaseCore
- FirebaseCoreInternal - FirebaseCoreInternal
...@@ -220,6 +258,7 @@ SPEC REPOS: ...@@ -220,6 +258,7 @@ SPEC REPOS:
- PromisesObjC - PromisesObjC
- SDWebImage - SDWebImage
- SDWebImageWebPCoder - SDWebImageWebPCoder
- SwiftyGif
EXTERNAL SOURCES: EXTERNAL SOURCES:
app_settings: app_settings:
...@@ -230,6 +269,8 @@ EXTERNAL SOURCES: ...@@ -230,6 +269,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_plus/ios" :path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus: device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios" :path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_core: firebase_core:
:path: ".symlinks/plugins/firebase_core/ios" :path: ".symlinks/plugins/firebase_core/ios"
firebase_messaging: firebase_messaging:
...@@ -290,6 +331,9 @@ SPEC CHECKSUMS: ...@@ -290,6 +331,9 @@ SPEC CHECKSUMS:
camera_avfoundation: adb0207d868b2d873e895371d88448399ab78d87 camera_avfoundation: adb0207d868b2d873e895371d88448399ab78d87
connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342 device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
file_picker: b159e0c068aef54932bb15dc9fd1571818edaf49
Firebase: 1fe1c0a7d9aaea32efe01fbea5f0ebd8d70e53a2 Firebase: 1fe1c0a7d9aaea32efe01fbea5f0ebd8d70e53a2
firebase_core: 432718558359a8c08762151b5f49bb0f093eb6e0 firebase_core: 432718558359a8c08762151b5f49bb0f093eb6e0
firebase_messaging: 3b99522baf7480dfb4b7683d2b34e842d577c362 firebase_messaging: 3b99522baf7480dfb4b7683d2b34e842d577c362
...@@ -331,6 +375,7 @@ SPEC CHECKSUMS: ...@@ -331,6 +375,7 @@ SPEC CHECKSUMS:
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
syncfusion_flutter_pdfviewer: cfcf23c03816192575902e615fa50adc9f95b724 syncfusion_flutter_pdfviewer: cfcf23c03816192575902e615fa50adc9f95b724
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: ab1e58b71690b7e61b58eae7a963b68ee286a146 webview_flutter_wkwebview: ab1e58b71690b7e61b58eae7a963b68ee286a146
......
...@@ -26,7 +26,6 @@ import 'package:flutter/material.dart'; ...@@ -26,7 +26,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/flutter_html.dart' as html; import 'package:flutter_html/flutter_html.dart' as html;
class MyHomePage extends StatefulWidget { class MyHomePage extends StatefulWidget {
const MyHomePage({super.key}); const MyHomePage({super.key});
...@@ -148,10 +147,16 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -148,10 +147,16 @@ class _MyHomePageState extends State<MyHomePage> {
return (connection == 'Online') return (connection == 'Online')
? Consumer2<HomescreenNotifier, ProfileNotifer>( ? Consumer2<HomescreenNotifier, ProfileNotifer>(
builder: (context, homescreen, profile, child) { builder: (context, homescreen, profile, child) {
final coreRequiredRoles = ["12", "540","433", "434", "430"]; final coreRequiredRoles = ["12", "540", "433", "434", "430"];
final requiredRoles = ["430", "430", "431", "431"]; final requiredRoles = ["430", "430", "431", "431"];
final coreNames = ["CRM", "Orders","Service", "Gen Tracker","HRM" ]; final coreNames = [
"CRM",
"Orders",
"Service",
"Gen Tracker",
"HRM",
];
final names = ["Attendance", "Finance", "ERP", "Whizzdom"]; final names = ["Attendance", "Finance", "ERP", "Whizzdom"];
final subtitles = [ final subtitles = [
"Check-in,Check-out", "Check-in,Check-out",
...@@ -165,7 +170,6 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -165,7 +170,6 @@ class _MyHomePageState extends State<MyHomePage> {
"assets/svg/home/home_service_ic.svg", "assets/svg/home/home_service_ic.svg",
"assets/svg/home/home_gentracker_ic.svg", "assets/svg/home/home_gentracker_ic.svg",
"assets/svg/home/icd.svg", "assets/svg/home/icd.svg",
]; ];
final icons = [ final icons = [
"assets/svg/home/home_attendance_ic.svg", "assets/svg/home/home_attendance_ic.svg",
...@@ -242,9 +246,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -242,9 +246,7 @@ class _MyHomePageState extends State<MyHomePage> {
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick(); HapticFeedback.selectionClick();
_showProfileBottomSheet( _showProfileBottomSheet(context);
context,
);
}, },
child: Container( child: Container(
// padding: EdgeInsets.symmetric(vertical: 5), // padding: EdgeInsets.symmetric(vertical: 5),
...@@ -261,7 +263,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -261,7 +263,10 @@ class _MyHomePageState extends State<MyHomePage> {
right: 15, right: 15,
top: 30, top: 30,
), ),
padding: EdgeInsets.only(bottom: 1, right: 10), padding: EdgeInsets.only(
bottom: 1,
right: 10,
),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
gradient: LinearGradient( gradient: LinearGradient(
...@@ -272,7 +277,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -272,7 +277,8 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
), ),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
...@@ -281,15 +287,15 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -281,15 +287,15 @@ class _MyHomePageState extends State<MyHomePage> {
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 25, left: 25,
top: 15, top: 15,
bottom: 15 bottom: 15,
), ),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
// Text( // Text(
// "${profile.employeeName}", // "${profile.employeeName}",
// maxLines: 1, // maxLines: 1,
...@@ -338,22 +344,23 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -338,22 +344,23 @@ class _MyHomePageState extends State<MyHomePage> {
fontSize: 14, fontSize: 14,
), ),
), ),
SizedBox(height: 12,), SizedBox(height: 12),
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
Container( Container(
width: 12, width: 12,
height: 12, height: 12,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: color:
homescreen.onlineStatus == homescreen.onlineStatus ==
"Online" "Online"
? AppColors.approved_text_color ? AppColors
: AppColors.rejected_text_color, .approved_text_color
: AppColors
.rejected_text_color,
), ),
), ),
SizedBox(width: 6), SizedBox(width: 6),
...@@ -361,12 +368,11 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -361,12 +368,11 @@ class _MyHomePageState extends State<MyHomePage> {
"${homescreen.onlineStatus}", "${homescreen.onlineStatus}",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontFamily: "JakartaRegular", fontFamily:
"JakartaRegular",
color: Color(0xFF2D2D2D), color: Color(0xFF2D2D2D),
), ),
), ),
], ],
), ),
], ],
...@@ -391,24 +397,24 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -391,24 +397,24 @@ class _MyHomePageState extends State<MyHomePage> {
height: 60, height: 60,
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.circular(50), BorderRadius.circular(50),
child: CachedNetworkImage( child: CachedNetworkImage(
cacheKey: cacheKey:
profile.profileImage, profile.profileImage,
fit: BoxFit.cover, fit: BoxFit.cover,
imageUrl: imageUrl:
"${profile.profileImage}", "${profile.profileImage}",
useOldImageOnUrlChange: false, useOldImageOnUrlChange:
false,
placeholder: placeholder:
(context, url) => (context, url) =>
CircularProgressIndicator.adaptive(), CircularProgressIndicator.adaptive(),
errorWidget: errorWidget:
(context, url, error) => (context, url, error) =>
Icon(Icons.error), Icon(Icons.error),
), ),
), ),
), ),
], ],
), ),
), ),
...@@ -550,8 +556,6 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -550,8 +556,6 @@ class _MyHomePageState extends State<MyHomePage> {
// ), // ),
// ), // ),
// ], // ],
if (homescreen.roleStatus.contains( if (homescreen.roleStatus.contains(
"432", "432",
)) ...[ )) ...[
...@@ -562,10 +566,9 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -562,10 +566,9 @@ class _MyHomePageState extends State<MyHomePage> {
bottom: 5, bottom: 5,
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, left: 10,
bottom: 5, bottom: 5,
top: 10 top: 10,
), ),
child: Text( child: Text(
"Workforce & Operations", "Workforce & Operations",
...@@ -586,11 +589,13 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -586,11 +589,13 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(14), borderRadius: BorderRadius.circular(
14,
),
), ),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: List.generate(4, (ic) { children: List.generate(4, (ic) {
return Expanded( return Expanded(
child: InkResponse( child: InkResponse(
...@@ -604,30 +609,31 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -604,30 +609,31 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
AttendanceScreen(), AttendanceScreen(),
settings: RouteSettings( settings: RouteSettings(
arguments: arguments:
'AttendanceScreen', 'AttendanceScreen',
), ),
), ),
); );
break; break;
case "ERP": case "ERP":
bool isGpsEnabled = bool isGpsEnabled =
await Geolocator.isLocationServiceEnabled(); await Geolocator.isLocationServiceEnabled();
if (isGpsEnabled) { if (isGpsEnabled) {
if (Platform.isAndroid) { if (Platform
.isAndroid) {
res = await Navigator.push( res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
( (
context, context,
) => WebErpScreen( ) => WebErpScreen(
erp_url: erp_url:
homescreen homescreen
.webPageUrl, .webPageUrl,
), ),
), ),
); );
} else { } else {
...@@ -636,12 +642,12 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -636,12 +642,12 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
( (
context, context,
) => WebERPIOS( ) => WebERPIOS(
url: url:
homescreen homescreen
.webPageUrl, .webPageUrl,
), ),
), ),
); );
} }
...@@ -651,19 +657,19 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -651,19 +657,19 @@ class _MyHomePageState extends State<MyHomePage> {
break; break;
case "Whizzdom": case "Whizzdom":
bool isGpsEnabled = bool isGpsEnabled =
await Geolocator.isLocationServiceEnabled(); await Geolocator.isLocationServiceEnabled();
if (isGpsEnabled) { if (isGpsEnabled) {
res = await Navigator.push( res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
( (
context, context,
) => WebWhizzdomScreen( ) => WebWhizzdomScreen(
whizzdom_url: whizzdom_url:
homescreen homescreen
.whizzdomPageUrl, .whizzdomPageUrl,
), ),
), ),
); );
} else { } else {
...@@ -676,10 +682,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -676,10 +682,10 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
Financedashboard(), Financedashboard(),
settings: RouteSettings( settings: RouteSettings(
arguments: arguments:
'Financedashboard', 'Financedashboard',
), ),
), ),
); );
...@@ -697,9 +703,11 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -697,9 +703,11 @@ class _MyHomePageState extends State<MyHomePage> {
child: SizedBox( child: SizedBox(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment
.center,
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment
.center,
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
filteredItems[ic]['icon'] ?? filteredItems[ic]['icon'] ??
...@@ -711,11 +719,11 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -711,11 +719,11 @@ class _MyHomePageState extends State<MyHomePage> {
"-", "-",
maxLines: 2, maxLines: 2,
textAlign: textAlign:
TextAlign.center, TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontFamily: fontFamily:
"JakartaMedium", "JakartaMedium",
), ),
), ),
], ],
...@@ -729,10 +737,9 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -729,10 +737,9 @@ class _MyHomePageState extends State<MyHomePage> {
], ],
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, left: 10,
bottom: 5, bottom: 5,
top: 10 top: 10,
), ),
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
top: 10, top: 10,
...@@ -823,14 +830,13 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -823,14 +830,13 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
), ),
), ),
] ] else ...[
else...[
if (filteredItems.isNotEmpty) ...[ if (filteredItems.isNotEmpty) ...[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, left: 10,
bottom: 5, bottom: 5,
top: 10 top: 10,
), ),
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
top: 10, top: 10,
...@@ -853,10 +859,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -853,10 +859,10 @@ class _MyHomePageState extends State<MyHomePage> {
shrinkWrap: true, shrinkWrap: true,
itemCount: filteredItems.length, itemCount: filteredItems.length,
gridDelegate: gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount( SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 2 / 1.1, childAspectRatio: 2 / 1.1,
), ),
itemBuilder: (context, ci) { itemBuilder: (context, ci) {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
...@@ -869,17 +875,17 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -869,17 +875,17 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
AttendanceScreen(), AttendanceScreen(),
settings: RouteSettings( settings: RouteSettings(
arguments: arguments:
'AttendanceScreen', 'AttendanceScreen',
), ),
), ),
); );
break; break;
case "ERP": case "ERP":
bool isGpsEnabled = bool isGpsEnabled =
await Geolocator.isLocationServiceEnabled(); await Geolocator.isLocationServiceEnabled();
if (isGpsEnabled) { if (isGpsEnabled) {
if (Platform.isAndroid) { if (Platform.isAndroid) {
res = await Navigator.push( res = await Navigator.push(
...@@ -887,12 +893,12 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -887,12 +893,12 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
( (
context, context,
) => WebErpScreen( ) => WebErpScreen(
erp_url: erp_url:
homescreen homescreen
.webPageUrl, .webPageUrl,
), ),
), ),
); );
} else { } else {
...@@ -901,12 +907,12 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -901,12 +907,12 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
( (
context, context,
) => WebERPIOS( ) => WebERPIOS(
url: url:
homescreen homescreen
.webPageUrl, .webPageUrl,
), ),
), ),
); );
} }
...@@ -916,19 +922,19 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -916,19 +922,19 @@ class _MyHomePageState extends State<MyHomePage> {
break; break;
case "Whizzdom": case "Whizzdom":
bool isGpsEnabled = bool isGpsEnabled =
await Geolocator.isLocationServiceEnabled(); await Geolocator.isLocationServiceEnabled();
if (isGpsEnabled) { if (isGpsEnabled) {
res = await Navigator.push( res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
( (
context, context,
) => WebWhizzdomScreen( ) => WebWhizzdomScreen(
whizzdom_url: whizzdom_url:
homescreen homescreen
.whizzdomPageUrl, .whizzdomPageUrl,
), ),
), ),
); );
} else { } else {
...@@ -941,10 +947,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -941,10 +947,10 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
Financedashboard(), Financedashboard(),
settings: RouteSettings( settings: RouteSettings(
arguments: arguments:
'Financedashboard', 'Financedashboard',
), ),
), ),
); );
...@@ -959,7 +965,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -959,7 +965,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} }
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 5, vertical: 5,
...@@ -972,24 +978,24 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -972,24 +978,24 @@ class _MyHomePageState extends State<MyHomePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: borderRadius:
BorderRadius.circular(14), BorderRadius.circular(14),
), ),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
flex: 2, flex: 2,
child: SizedBox( child: SizedBox(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
.center, .center,
children: [ children: [
Text( Text(
filteredItems[ci]['name'] ?? filteredItems[ci]['name'] ??
...@@ -997,10 +1003,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -997,10 +1003,10 @@ class _MyHomePageState extends State<MyHomePage> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: color:
AppColors AppColors
.app_blue, .app_blue,
fontFamily: fontFamily:
"JakartaMedium", "JakartaMedium",
), ),
), ),
Text( Text(
...@@ -1009,10 +1015,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1009,10 +1015,10 @@ class _MyHomePageState extends State<MyHomePage> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: color:
AppColors AppColors
.grey_semi, .grey_semi,
fontFamily: fontFamily:
"JakartaMedium", "JakartaMedium",
), ),
), ),
], ],
...@@ -1036,7 +1042,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1036,7 +1042,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
], ],
], ],
// if (filteredItems.isNotEmpty) ...[ // if (filteredItems.isNotEmpty) ...[
// Container( // Container(
// margin: EdgeInsets.symmetric( // margin: EdgeInsets.symmetric(
...@@ -1244,13 +1250,12 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1244,13 +1250,12 @@ class _MyHomePageState extends State<MyHomePage> {
// ), // ),
// ), // ),
// ], // ],
if (coreFilteredItems.isNotEmpty) ...[ if (coreFilteredItems.isNotEmpty) ...[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, left: 10,
bottom: 5, bottom: 5,
top: 10 top: 10,
), ),
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
top: 10, top: 10,
...@@ -1274,10 +1279,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1274,10 +1279,10 @@ class _MyHomePageState extends State<MyHomePage> {
itemCount: coreFilteredItems.length, itemCount: coreFilteredItems.length,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
gridDelegate: gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount( SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 2 / 1.1, childAspectRatio: 2 / 1.1,
), ),
itemBuilder: (context, ci) { itemBuilder: (context, ci) {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
...@@ -1290,25 +1295,25 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1290,25 +1295,25 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
Gentrackerdashboard(), Gentrackerdashboard(),
settings: RouteSettings( settings: RouteSettings(
arguments: arguments:
'Gentrackerdashboard', 'Gentrackerdashboard',
), ),
), ),
); );
// res = await Navigator.push( // res = await Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: // builder:
// (context) => Scanentergeneratoridscreen( // (context) => Scanentergeneratoridscreen(
// from: "Generator Details", // from: "Generator Details",
// ), // ),
// settings: RouteSettings( // settings: RouteSettings(
// name: 'Scanentergeneratoridscreen' // name: 'Scanentergeneratoridscreen'
// ) // )
// ), // ),
// ); // );
break; break;
case "Service": case "Service":
res = await Navigator.push( res = await Navigator.push(
...@@ -1316,7 +1321,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1316,7 +1321,7 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
Serviceengineerdashboard(), Serviceengineerdashboard(),
), ),
); );
break; break;
...@@ -1326,7 +1331,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1326,7 +1331,7 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
Ordermoduledashboard(), Ordermoduledashboard(),
), ),
); );
case "CRM": case "CRM":
...@@ -1335,10 +1340,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1335,10 +1340,10 @@ class _MyHomePageState extends State<MyHomePage> {
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) =>
CrmdashboardScreen(), CrmdashboardScreen(),
settings: RouteSettings( settings: RouteSettings(
name: name:
'CrmdashboardScreen', 'CrmdashboardScreen',
), ),
), ),
); );
...@@ -1351,7 +1356,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1351,7 +1356,7 @@ class _MyHomePageState extends State<MyHomePage> {
HrmdashboardScreen(), HrmdashboardScreen(),
settings: RouteSettings( settings: RouteSettings(
name: name:
'CrmdashboardScreen', 'CrmdashboardScreen',
), ),
), ),
); );
...@@ -1365,7 +1370,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1365,7 +1370,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} }
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 5, vertical: 5,
...@@ -1378,24 +1383,24 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1378,24 +1383,24 @@ class _MyHomePageState extends State<MyHomePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: borderRadius:
BorderRadius.circular(14), BorderRadius.circular(14),
), ),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
flex: 2, flex: 2,
child: SizedBox( child: SizedBox(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
.center, .center,
children: [ children: [
Text( Text(
coreFilteredItems[ci]['name'] ?? coreFilteredItems[ci]['name'] ??
...@@ -1403,10 +1408,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1403,10 +1408,10 @@ class _MyHomePageState extends State<MyHomePage> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: color:
AppColors AppColors
.app_blue, .app_blue,
fontFamily: fontFamily:
"JakartaMedium", "JakartaMedium",
), ),
), ),
Text( Text(
...@@ -1415,10 +1420,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1415,10 +1420,10 @@ class _MyHomePageState extends State<MyHomePage> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: color:
AppColors AppColors
.grey_semi, .grey_semi,
fontFamily: fontFamily:
"JakartaMedium", "JakartaMedium",
), ),
), ),
], ],
...@@ -1433,7 +1438,6 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1433,7 +1438,6 @@ class _MyHomePageState extends State<MyHomePage> {
"-", "-",
height: 40, height: 40,
width: 40, width: 40,
), ),
), ),
], ],
...@@ -1444,8 +1448,6 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1444,8 +1448,6 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
), ),
], ],
], ],
), ),
), ),
...@@ -1874,7 +1876,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1874,7 +1876,10 @@ class _MyHomePageState extends State<MyHomePage> {
profile.mobileNUmber, profile.mobileNUmber,
]; ];
final itemText = textHeadings[index]?.toString() ?? "-"; final itemText =
textHeadings[index]
?.toString() ??
"-";
return SizedBox( return SizedBox(
height: 40, height: 40,
...@@ -1882,49 +1887,95 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1882,49 +1887,95 @@ class _MyHomePageState extends State<MyHomePage> {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
final profileNotifier = Provider.of<ProfileNotifer>(context, listen: false); final profileNotifier =
Provider.of<
ProfileNotifer
>(
context,
listen: false,
);
// Call API // Call API
await profileNotifier.fetchJobDescription( await profileNotifier
Provider.of<HomescreenNotifier>(context, listen: false), .fetchJobDescription(
context, Provider.of<
); HomescreenNotifier
>(
context,
listen: false,
),
context,
);
// fetching, check response // fetching, check response
if (profileNotifier.response != null && if (profileNotifier
profileNotifier.response!.jobDescription != null) { .response !=
null &&
if (profileNotifier.response!.jobDescription!.jobDescription != null && profileNotifier.response!.jobDescription!.jobDescription != "") { profileNotifier
.response!
.jobDescription !=
null) {
if (profileNotifier
.response!
.jobDescription!
.jobDescription !=
null &&
profileNotifier
.response!
.jobDescription!
.jobDescription !=
"") {
showJobDescriptionSheet( showJobDescriptionSheet(
context: context, context: context,
htmlData: profileNotifier.response!.jobDescription!.jobDescription ?? "<p>No description</p>", htmlData:
title: "Job Description",//profileNotifier.response!.jobDescription!.name ?? profileNotifier
); .response!
.jobDescription!
.jobDescription ??
"<p>No description</p>",
title:
"Job Description", //profileNotifier.response!.jobDescription!.name ??
);
} }
} else { } else {
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(
context,
).showSnackBar(
SnackBar( SnackBar(
content: Text(profileNotifier.errorMessage ?? "Failed to fetch job description"), content: Text(
profileNotifier
.errorMessage ??
"Failed to fetch job description",
),
), ),
); );
} }
}, },
// no click for others // no click for others
child: Text( child: Text(
itemText, itemText,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: index == 2 ? AppColors.semi_black : AppColors.semi_black, color:
decoration: index == 2 ? TextDecoration.underline : null, index == 2
decorationStyle: TextDecorationStyle.dotted, ? AppColors
.semi_black
: AppColors
.semi_black,
decoration:
index == 2
? TextDecoration
.underline
: null,
decorationStyle:
TextDecorationStyle
.dotted,
), ),
), ),
), ),
), ),
); );
}, },
), ),
), ),
], ],
...@@ -1990,12 +2041,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1990,12 +2041,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} }
// Job Descriptions
// Job Descriptions
Future<void> showJobDescriptionSheet({ Future<void> showJobDescriptionSheet({
required BuildContext context, required BuildContext context,
...@@ -2071,7 +2117,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -2071,7 +2117,10 @@ class _MyHomePageState extends State<MyHomePage> {
fontSize: FontSize(15), fontSize: FontSize(15),
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
color: AppColors.grey_semi, color: AppColors.grey_semi,
padding: HtmlPaddings.only(left: 10, right: 8), // fixed for v3.0.0 padding: HtmlPaddings.only(
left: 10,
right: 8,
), // fixed for v3.0.0
lineHeight: LineHeight.number(1.4), lineHeight: LineHeight.number(1.4),
), ),
"li": Style( "li": Style(
...@@ -2081,9 +2130,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -2081,9 +2130,10 @@ class _MyHomePageState extends State<MyHomePage> {
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
color: Colors.black, color: Colors.black,
padding: HtmlPaddings.only(left: 4), padding: HtmlPaddings.only(left: 4),
lineHeight: LineHeight.number(1.4), // bullet text line height lineHeight: LineHeight.number(
1.4,
), // bullet text line height
margin: Margins.only(bottom: 10), margin: Margins.only(bottom: 10),
), ),
"a": Style( "a": Style(
color: Colors.blue, color: Colors.blue,
...@@ -2135,10 +2185,6 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -2135,10 +2185,6 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} }
// Future<void> showJobDescriptionSheet( // Future<void> showJobDescriptionSheet(
// BuildContext context, // BuildContext context,
// List<String> jobPoints, // List<String> jobPoints,
...@@ -2247,7 +2293,6 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -2247,7 +2293,6 @@ class _MyHomePageState extends State<MyHomePage> {
// ); // );
// } // }
Future<void> _showLogoutBottomSheet(BuildContext context) { Future<void> _showLogoutBottomSheet(BuildContext context) {
return showModalBottomSheet( return showModalBottomSheet(
useSafeArea: true, useSafeArea: true,
...@@ -2297,18 +2342,21 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -2297,18 +2342,21 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
SizedBox(height: 20), SizedBox(height: 20),
InkWell( InkWell(
onTap:logout.logoutButtonClicked?null: () { onTap:
HapticFeedback.selectionClick(); logout.logoutButtonClicked
// LoginApiFunction(); ? null
logout.logoutButtonClicked = true; : () {
var f = FocusScope.of(context); HapticFeedback.selectionClick();
// LoginApiFunction();
logout.logoutButtonClicked = true;
var f = FocusScope.of(context);
if (!f.hasPrimaryFocus) { if (!f.hasPrimaryFocus) {
f.unfocus(); f.unfocus();
} }
logout.LogoutApiFunction(home, context); logout.LogoutApiFunction(home, context);
// Navigator.push(context,MaterialPageRoute(builder: (context)=>Profile())); // Navigator.push(context,MaterialPageRoute(builder: (context)=>Profile()));
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
height: 45, height: 45,
......
...@@ -61,10 +61,10 @@ packages: ...@@ -61,10 +61,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: async name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.12.0" version: "2.13.0"
auto_size_text: auto_size_text:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -445,10 +445,10 @@ packages: ...@@ -445,10 +445,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.2" version: "1.3.3"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
...@@ -1180,26 +1180,26 @@ packages: ...@@ -1180,26 +1180,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.8" version: "11.0.1"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.9" version: "3.0.10"
leak_tracker_testing: leak_tracker_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_testing name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
lints: lints:
dependency: transitive dependency: transitive
description: description:
...@@ -2017,10 +2017,10 @@ packages: ...@@ -2017,10 +2017,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.3.1" version: "15.0.0"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment