diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 132ad69..6d2f83f 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -8,13 +8,13 @@
-
+
-
+
diff --git a/android/gradle.properties b/android/gradle.properties
index fbdc0de..8df3fe9 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,4 +1,5 @@
-org.gradle.jvmargs=-Xmx2048M
+org.gradle.jvmargs=-Xmx4096m
+kotlin.daemon.jvmargs=-Xmx4096m
android.useAndroidX=true
android.enableJetifier=true
apmsInstrumentationEnabled=false
diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart
index ae5fda8..2bddb42 100644
--- a/lib/api/dashboard_api_client.dart
+++ b/lib/api/dashboard_api_client.dart
@@ -5,6 +5,7 @@ import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:http/http.dart' as http;
import 'package:device_info_plus/device_info_plus.dart';
+import 'package:mobile_device_identifier/mobile_device_identifier.dart';
import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.dart';
@@ -18,10 +19,7 @@ import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
import 'package:mohem_flutter_app/models/sso_auth_model.dart';
-import 'package:platform_device_id_plus/platform_device_id.dart';
-// import 'package:platform_device_id/platform_device_id.dart';
-// import 'package:platform_device_id/platform_device_id.dart';
import 'package:uuid/uuid.dart';
class DashboardApiClient {
@@ -230,7 +228,8 @@ class DashboardApiClient {
Future getBookingSSOFinalRedirection({required String token}) async {
token =
"eyJhbGciOiJSUzI1NiIsImtpZCI6IjhjZTE2OWM0YjIwYjQ2ZWM5YTQyOTU3Y2ZhODUzNzQ1IiwidHlwIjoiSldUIn0.eyJ0ZW5hbnRfaWQiOiJhOWY0ZDFhMDU5NmQ0YWVhOGY4MzA5OTJlYzRiZGFjMSIsImVpZCI6IjExNzkzMCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6Ijk2MDI0OGM1NzA3YzQ3MmFhYTEzM2I1N2ZhODE1ZmVhIiwibGFuZ3VhZ2UiOiJVUyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6IjExNzkzMEBobWcuY29tIiwiZXhwIjoxNzgyNDc1NzY5LCJpc3MiOiJodHRwczovL3Nzby11YXQuaG1nLmNvbSIsImF1ZCI6ImE5ZjRkMWEwNTk2ZDRhZWE4ZjgzMDk5MmVjNGJkYWMxIn0.rJcLVsG8D0XECyLERCTD2uqGeWyvp-OBVGE9uL2qKrX4etFUHgdFt_5kYF6edFTtGy-0PIZadHDmv7e-IOhVWHm5HVMClaukiXoRXR8cDN8XA1wfme3Kd-U5PXN-IRh49AyRTzLO0rYNPvH81ScosWGlsFSkOvA-0hJNa2adHdtvgNvB8wJshSU5p7sAmF8mjdDY6aInG19etu2iEuUDwHHA4ZY_ts4hboHo8fE392hFaYGonExoD7bpW5RMx5xKWeRCmWpG_PK8Aw_z1jGzdB9PANus4pteRGuln1J-kmo2lQC9pVrSyZATAKp1HfgfyZ_vUhaHEfM69cMWaCslJQ";
- var request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
+ // var request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
+ var request = http.MultipartRequest('POST', Uri.parse('https://Paxes-release.techmaster.in/SSO/HMG'));
request.fields.addAll({'JWTToken': token});
// request.headers.addAll(headers);
@@ -255,13 +254,17 @@ class DashboardApiClient {
String QRValue = "",
String payrollCode = "",
}) async {
+ var _mobileDeviceIdentifierPlugin = MobileDeviceIdentifier();
+ Codec stringToBase64 = utf8.fuse(base64);
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
var uuid = Uuid();
String? deviceId = "";
// Generate a v4 (random) id
if (Platform.isAndroid) {
AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
- deviceId = androidInfo.id;
+ deviceId = await _mobileDeviceIdentifierPlugin.getDeviceId() ?? androidInfo.id;
+ deviceId = stringToBase64.encode(deviceId);
+ deviceId = deviceId.length >= 50 ? deviceId.substring(0, 48) : deviceId;
} else if (Platform.isIOS) {
IosDeviceInfo iosInfo = await DeviceInfoPlugin().iosInfo;
deviceId = iosInfo.identifierForVendor;
diff --git a/lib/app_state/app_state.dart b/lib/app_state/app_state.dart
index 3dfd812..799bcb5 100644
--- a/lib/app_state/app_state.dart
+++ b/lib/app_state/app_state.dart
@@ -90,7 +90,7 @@ class AppState {
String get getHuaweiPushToken => _huaweiPushToken;
- final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 9.4, mobileType: Platform.isAndroid ? "android" : "ios");
+ final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 9.5, mobileType: Platform.isAndroid ? "android" : "ios");
void setPostParamsInitConfig() {
isAuthenticated = false;
diff --git a/lib/main.dart b/lib/main.dart
index 39f19e5..263ed8e 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -82,18 +82,22 @@ class MyApp extends StatelessWidget {
List> delegates = context.localizationDelegates;
// delegates.add(GlobalMaterialLocalizations.delegate);
delegates.add(MonthYearPickerLocalizations.delegate);
- return MaterialApp(
- navigatorKey: AppRoutes.navigatorKey,
- builder: (BuildContext context, Widget? child) {
- return MediaQuery(data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: child!);
- },
- theme: AppTheme.getTheme(EasyLocalization.of(context)?.locale.languageCode == "ar"),
- debugShowCheckedModeBanner: false,
- localizationsDelegates: delegates,
- supportedLocales: context.supportedLocales,
- locale: context.locale,
- initialRoute: AppRoutes.initialRoute,
- routes: AppRoutes.routes,
+ return SafeArea(
+ top: false, // Set to true if you want to avoid the notch area as well
+ bottom: Platform.isIOS ? false : true,
+ child: MaterialApp(
+ navigatorKey: AppRoutes.navigatorKey,
+ builder: (BuildContext context, Widget? child) {
+ return MediaQuery(data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: child!);
+ },
+ theme: AppTheme.getTheme(EasyLocalization.of(context)?.locale.languageCode == "ar"),
+ debugShowCheckedModeBanner: false,
+ localizationsDelegates: delegates,
+ supportedLocales: context.supportedLocales,
+ locale: context.locale,
+ initialRoute: AppRoutes.initialRoute,
+ routes: AppRoutes.routes,
+ ),
);
},
);
diff --git a/lib/ui/work_list/sheets/delegate_sheet.dart b/lib/ui/work_list/sheets/delegate_sheet.dart
index ef38ce0..d72b041 100644
--- a/lib/ui/work_list/sheets/delegate_sheet.dart
+++ b/lib/ui/work_list/sheets/delegate_sheet.dart
@@ -1,5 +1,4 @@
import 'dart:collection';
-import 'dart:convert';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
@@ -33,16 +32,8 @@ class DelegateSheet extends StatefulWidget {
VoidCallback callBackFunc;
List getNotificationRespondAttributes;
- DelegateSheet({
- super.key,
- required this.title,
- required this.apiMode,
- this.notificationID,
- this.actionHistoryList,
- this.wFHistory,
- required this.callBackFunc,
- this.getNotificationRespondAttributes = const [],
- });
+ DelegateSheet(
+ {required this.title, required this.apiMode, this.notificationID, this.actionHistoryList, this.wFHistory, required this.callBackFunc, this.getNotificationRespondAttributes = const []});
@override
State createState() => _DelegateSheetState();
@@ -55,8 +46,8 @@ class _DelegateSheetState extends State {
String? selectedFavLetter;
String selectedType = "Workflow";
String inputRes = "";
+ List? favLetters;
List? favUsersList;
- List? filteredFavUsersList = [];
List? replacementList;
bool isImageLoaded = false;
@@ -66,14 +57,14 @@ class _DelegateSheetState extends State {
super.initState();
if (widget.wFHistory != null) {
widget.wFHistory = widget.wFHistory!.reversed.toList();
- Set ids = widget.wFHistory!.map((WFHistory e) => e.employeeID).toSet();
- widget.wFHistory!.retainWhere((WFHistory x) => ids.remove(x.employeeID));
+ var ids = widget.wFHistory!.map((e) => e.employeeID).toSet();
+ widget.wFHistory!.retainWhere((x) => ids.remove(x.employeeID));
}
if (widget.actionHistoryList != null) {
widget.actionHistoryList = widget.actionHistoryList!.reversed.toList();
- Set ids = widget.actionHistoryList!.map((GetActionHistoryList e) => e.uSERNAME).toSet();
- widget.actionHistoryList!.retainWhere((GetActionHistoryList x) => ids.remove(x.uSERNAME));
+ var ids = widget.actionHistoryList!.map((e) => e.uSERNAME).toSet();
+ widget.actionHistoryList!.retainWhere((x) => ids.remove(x.uSERNAME));
}
}
@@ -82,96 +73,36 @@ class _DelegateSheetState extends State {
super.dispose();
}
- Future fetchFavUsers({bool isNeedLoading = true}) async {
- favUsersList = [];
- filteredFavUsersList = [];
-
+ Future fetchFavLetters({bool isNeedLoading = true}) async {
+ favLetters = [];
if (isNeedLoading) Utils.showLoading(context);
-
- try {
- List? favList = await WorkListApiClient().getFavoriteReplacementWithoutImage();
- favUsersList = favList;
-
- if (favUsersList != null && favUsersList!.isNotEmpty) {
- favUsersList!.sort((GetFavoriteReplacements a, GetFavoriteReplacements b) => (a.employeeDisplayName ?? '').toLowerCase().compareTo((b.employeeDisplayName ?? '').toLowerCase()));
- filteredFavUsersList = favUsersList;
-
- if (isNeedLoading) Utils.hideLoading(context);
- setState(() {});
- _fetchAndAttachUserImages();
- } else {
- if (isNeedLoading) Utils.hideLoading(context);
- setState(() {});
- }
- } catch (e) {
- if (isNeedLoading) Utils.hideLoading(context);
- setState(() {});
- }
+ List? favList = await WorkListApiClient().getFavoriteReplacementWithoutImage();
+ List result = [];
+ favList!.forEach((element) {
+ result.add(element.employeeDisplayName![0]);
+ });
+ favLetters = LinkedHashSet.from(result).toList();
+ if (isNeedLoading) Utils.hideLoading(context);
+ setState(() {
+ favLetters!.sort((a, b) {
+ return a.toLowerCase().compareTo(b.toLowerCase());
+ });
+ });
+ return null;
}
- Future _fetchAndAttachUserImages() async {
- try {
- List? tempList = await WorkListApiClient().getFavoriteReplacementWithImageNew("");
-
- if (tempList != null && tempList.isNotEmpty && favUsersList != null) {
- for (GetFavoriteReplacements element in favUsersList!) {
- for (GetFavoriteReplacements element2 in tempList) {
- if (element.userName == element2.userName && element2.employeeImage != null && element2.employeeImage!.isNotEmpty) {
- element.employeeImage = element2.employeeImage;
- }
- }
- }
- filteredFavUsersList = favUsersList;
- setState(() {});
- }
- } catch (e) {}
+ Future fetchFavUsersList({bool isNeedLoading = true}) async {
+ if (isNeedLoading) Utils.showLoading(context);
+ favUsersList = await WorkListApiClient().getFavoriteReplacementWithImage(selectedFavLetter ?? "");
+ if (isNeedLoading) Utils.hideLoading(context);
+ setState(() {});
+ fetchFavUsersListNew(isNeedLoading: false);
+ return null;
}
- // Future fetchFavUsers({bool isNeedLoading = true}) async {
- // favUsersList = [];
- // if (isNeedLoading) Utils.showLoading(context);
- //
- // try {
- // List? favList = await WorkListApiClient().getFavoriteReplacementWithoutImage();
- // favUsersList = favList;
- //
- // if (favUsersList != null && favUsersList!.isNotEmpty) {
- // setState(() {
- // favUsersList!.sort((GetFavoriteReplacements a, GetFavoriteReplacements b) => (a.employeeDisplayName ?? '').toLowerCase().compareTo((b.employeeDisplayName ?? '').toLowerCase()));
- // });
- // if (isNeedLoading) Utils.hideLoading(context);
- //
- // List? tempList = await WorkListApiClient().getFavoriteReplacementWithImageNew("");
- // if (tempList != null && tempList.isNotEmpty) {
- // for (GetFavoriteReplacements element in favUsersList!) {
- // for (GetFavoriteReplacements element2 in tempList) {
- // if (element.userName == element2.userName) {
- // if (element2.employeeImage != null && element2.employeeImage!.isNotEmpty) {
- // element.employeeImage = element2.employeeImage;
- // }
- // }
- // }
- // }
- // setState(() {});
- // }
- // }
- // } catch (e) {
- // // if (isNeedLoading) Utils.hideLoading(context);
- // }
- // }
-
- // Future fetchFavUsersList({bool isNeedLoading = true}) async {
- // if (isNeedLoading) Utils.showLoading(context);
- // favUsersList = await WorkListApiClient().getFavoriteReplacementWithImage(selectedFavLetter ?? "");
- // if (isNeedLoading) Utils.hideLoading(context);
- // setState(() {});
- // fetchFavUsersListNew(isNeedLoading: false);
- // return null;
- // }
-
Future fetchFavUsersListNew({bool isNeedLoading = true}) async {
if (isNeedLoading) Utils.showLoading(context);
- filteredFavUsersList = await WorkListApiClient().getFavoriteReplacementWithImageNew(selectedFavLetter ?? "");
+ favUsersList = await WorkListApiClient().getFavoriteReplacementWithImageNew(selectedFavLetter ?? "");
if (isNeedLoading) Utils.hideLoading(context);
setState(() {
isImageLoaded = true;
@@ -181,10 +112,18 @@ class _DelegateSheetState extends State {
void fetchChangeFav({required String email, required String employeName, required String image, required String userName, bool isFav = false, bool isNeedToRefresh = false}) async {
Utils.showLoading(context);
- GenericResponseModel model = await WorkListApiClient().changeFavoriteReplacements(email: email, employeName: employeName, image: image, userName: userName, isFav: isFav);
+ favLetters = null;
+ selectedFavLetter = null;
+ GenericResponseModel model = await WorkListApiClient().changeFavoriteReplacements(
+ email: email,
+ employeName: employeName,
+ image: image,
+ userName: userName,
+ isFav: isFav,
+ );
if (isNeedToRefresh) {
- await fetchFavUsers(isNeedLoading: false);
- // if (favUsersList != null) await fetchFavUsersList(isNeedLoading: false);
+ await fetchFavLetters(isNeedLoading: false);
+ if (favLetters != null) await fetchFavUsersList(isNeedLoading: false);
}
Utils.hideLoading(context);
@@ -198,58 +137,44 @@ class _DelegateSheetState extends State {
userName: selectedType == "Employee Name" ? inputRes : "",
email: selectedType == "Employee Email" ? inputRes : "",
);
-
if (isNeedLoading) Utils.hideLoading(context);
setState(() {});
return null;
}
- Future searchFavUser() async {
- if (favUsersList != null && favUsersList!.isNotEmpty) {
- // if (inputRes.length > 0) {
- filteredFavUsersList =
- favUsersList!.where((GetFavoriteReplacements element) {
- String query = inputRes.toLowerCase();
- return (element.employeeDisplayName != null && element.employeeDisplayName!.toLowerCase().startsWith(query)) ||
- (element.userName != null && element.userName!.toLowerCase().contains(query)) ||
- (element.emailAddress != null && element.emailAddress!.toLowerCase().contains(query));
- }).toList();
- // } else {
- // filteredFavUsersList = favUsersList;
- // }
- } else {
- filteredFavUsersList = [];
- }
-
- setState(() {});
- }
-
@override
Widget build(BuildContext context) {
- return SizedBox(
+ return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height - 80,
child: Column(
- children: [
+ children: [
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
- children: [
+ children: [
widget.title.toText24(isBold: true),
21.height,
LocaleKeys.search.tr().toText16(),
11.height,
Column(
crossAxisAlignment: CrossAxisAlignment.end,
- children: [
+ children: [
Container(
- padding: const EdgeInsets.only(left: 8, right: 4, top: 6, bottom: 6),
- decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), color: Colors.transparent, border: Border.all(color: const Color(0xffefefef), width: 1)),
+ padding: EdgeInsets.only(left: 8, right: 4, top: 6, bottom: 6),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(15),
+ color: Colors.transparent,
+ border: Border.all(
+ color: Color(0xffefefef),
+ width: 1,
+ ),
+ ),
child: Row(
- children: [
+ children: [
Expanded(
child: InputWidget(
"Search By " + selectedType,
@@ -260,18 +185,29 @@ class _DelegateSheetState extends State {
verticalPadding: 3,
isInputTypeNum: selectedType == "Employee ID" ? true : false,
isEnable: isNeedEnableTextField,
- onChange: (String v) {
+ onChange: (v) {
inputRes = v;
- if (selectedType == "Favorites") {
- searchFavUser();
- }
},
),
),
- Container(height: 36, width: 1, color: const Color(0xffE5E5E5)),
Container(
- padding: const EdgeInsets.all(8),
- child: Row(children: [selectedType.toText12(), 4.width, const Icon(Icons.keyboard_arrow_down, color: Colors.black, size: 16)]),
+ height: 36,
+ width: 1,
+ color: Color(0xffE5E5E5),
+ ),
+ Container(
+ padding: EdgeInsets.all(8),
+ child: Row(
+ children: [
+ selectedType.toText12(),
+ 4.width,
+ const Icon(
+ Icons.keyboard_arrow_down,
+ color: Colors.black,
+ size: 16,
+ ),
+ ],
+ ),
).onPress(() {
showMyBottomSheet(
context,
@@ -283,17 +219,19 @@ class _DelegateSheetState extends State {
if (value == "Workflow") {
setState(() {
isNeedEnableTextField = false;
- // selectedFavLetter = null;
- filteredFavUsersList = null;
+ selectedFavLetter = null;
+ favLetters = null;
+ favUsersList = null;
});
} else if (value == "Favorites") {
- isNeedEnableTextField = true;
- fetchFavUsers();
+ isNeedEnableTextField = false;
+ fetchFavLetters();
} else {
setState(() {
isNeedEnableTextField = true;
- // selectedFavLetter = null;
- filteredFavUsersList = null;
+ selectedFavLetter = null;
+ favLetters = null;
+ favUsersList = null;
});
}
},
@@ -303,105 +241,143 @@ class _DelegateSheetState extends State {
],
),
),
- if (isNeedEnableTextField && selectedType != "Favorites")
+ if (isNeedEnableTextField)
TextButton(
onPressed: () {
fetchUserByInput();
},
- child: const Text("Search", style: TextStyle(color: Colors.blue, decoration: TextDecoration.underline)),
- ),
+ child: const Text(
+ "Search",
+ style: TextStyle(
+ color: Colors.blue,
+ decoration: TextDecoration.underline,
+ ),
+ ),
+ )
],
),
if (!isNeedEnableTextField) 12.height,
Row(
- children: [
+ children: [
Expanded(
- child: SizedBox(
+ child: Container(
width: double.infinity,
- child:
- // selectedFavLetter == null && favLetters != null
- // ? Container(width: double.infinity, alignment: Alignment.center, child: "Please select letter to see Fav results".toText12())
- // :
- filteredFavUsersList != null && selectedType == "Favorites"
- ? ListView.separated(
- itemBuilder: (BuildContext context, int index) {
- return showFavUserItem(filteredFavUsersList![index]);
- },
- separatorBuilder: (BuildContext context, int index) {
- return Container(color: MyColors.borderColor, width: double.infinity, height: 1, margin: const EdgeInsets.only(top: 8, bottom: 8)).onPress(() {});
- },
- physics: const NeverScrollableScrollPhysics(),
- shrinkWrap: true,
- itemCount: filteredFavUsersList!.length,
- padding: const EdgeInsets.only(top: 8, bottom: 8),
- )
- : isNeedEnableTextField && replacementList == null
- ? Container(width: double.infinity, alignment: Alignment.center, child: "Search User".toText12())
- : isNeedEnableTextField && replacementList!.isEmpty
- ? Container(width: double.infinity, alignment: Alignment.center, child: "No Data Found".toText12())
- : isNeedEnableTextField
- ? ListView.separated(
- itemBuilder: (BuildContext context, int index) {
- return showInputUserItem(replacementList![index]);
- },
- separatorBuilder: (BuildContext context, int index) {
- return Container(color: MyColors.borderE3Color, width: double.infinity, height: 1, margin: const EdgeInsets.only(top: 8, bottom: 8));
- },
- physics: const NeverScrollableScrollPhysics(),
- shrinkWrap: true,
- itemCount: replacementList!.length,
- padding: const EdgeInsets.only(top: 8, bottom: 8),
- )
- : (widget.wFHistory != null
- ? ListView.separated(
- itemBuilder: (BuildContext context, int index) {
- return showItgItem(widget.wFHistory![index]);
- },
- separatorBuilder: (BuildContext context, int index) {
- return Container(color: MyColors.borderE3Color, width: double.infinity, height: 1, margin: const EdgeInsets.only(top: 8, bottom: 8));
- },
- physics: const NeverScrollableScrollPhysics(),
- shrinkWrap: true,
- itemCount: widget.wFHistory!.length,
- padding: const EdgeInsets.only(top: 8, bottom: 8),
- )
- : ListView.separated(
- itemBuilder: (BuildContext context, int index) {
- return showItem(widget.actionHistoryList![index]);
- },
- separatorBuilder: (BuildContext context, int index) {
- return Container(color: MyColors.borderE3Color, width: double.infinity, height: 1, margin: const EdgeInsets.only(top: 8, bottom: 8));
- },
- physics: const NeverScrollableScrollPhysics(),
- shrinkWrap: true,
- itemCount: widget.actionHistoryList!.length,
- padding: const EdgeInsets.only(top: 8, bottom: 8),
- )),
+ child: selectedFavLetter == null && favLetters != null
+ ? Container(
+ width: double.infinity,
+ alignment: Alignment.center,
+ child: "Please select letter to see Fav results".toText12(),
+ )
+ : favUsersList != null
+ ? ListView.separated(
+ itemBuilder: (context, index) {
+ return showFavUserItem(favUsersList![index]);
+ },
+ separatorBuilder: (context, index) {
+ return Container(
+ color: MyColors.borderColor,
+ width: double.infinity,
+ height: 1,
+ margin: EdgeInsets.only(top: 8, bottom: 8),
+ ).onPress(() {});
+ },
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ itemCount: favUsersList!.length,
+ padding: EdgeInsets.only(top: 8, bottom: 8),
+ )
+ : isNeedEnableTextField && replacementList == null
+ ? Container(
+ width: double.infinity,
+ alignment: Alignment.center,
+ child: "Search User".toText12(),
+ )
+ : isNeedEnableTextField && replacementList!.length == 0
+ ? Container(
+ width: double.infinity,
+ alignment: Alignment.center,
+ child: "No Data Found".toText12(),
+ )
+ : isNeedEnableTextField
+ ? ListView.separated(
+ itemBuilder: (context, index) {
+ return showInputUserItem(replacementList![index]);
+ },
+ separatorBuilder: (context, index) {
+ return Container(
+ color: MyColors.borderE3Color,
+ width: double.infinity,
+ height: 1,
+ margin: EdgeInsets.only(top: 8, bottom: 8),
+ );
+ },
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ itemCount: replacementList!.length,
+ padding: EdgeInsets.only(top: 8, bottom: 8),
+ )
+ : (widget.wFHistory != null
+ ? ListView.separated(
+ itemBuilder: (context, index) {
+ return showItgItem(widget.wFHistory![index]);
+ },
+ separatorBuilder: (context, index) {
+ return Container(
+ color: MyColors.borderE3Color,
+ width: double.infinity,
+ height: 1,
+ margin: EdgeInsets.only(top: 8, bottom: 8),
+ );
+ },
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ itemCount: widget.wFHistory!.length,
+ padding: EdgeInsets.only(top: 8, bottom: 8),
+ )
+ : ListView.separated(
+ itemBuilder: (context, index) {
+ return showItem(widget.actionHistoryList![index]);
+ },
+ separatorBuilder: (context, index) {
+ return Container(
+ color: MyColors.borderE3Color,
+ width: double.infinity,
+ height: 1,
+ margin: EdgeInsets.only(top: 8, bottom: 8),
+ );
+ },
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ itemCount: widget.actionHistoryList!.length,
+ padding: EdgeInsets.only(top: 8, bottom: 8),
+ )),
),
),
- // if (favLetters != null)
- // SizedBox(
- // width: 30,
- // // color: Colors.red,
- // child: ListView.separated(
- // itemBuilder: (BuildContext context, int index) {
- // return Container(
- // padding: const EdgeInsets.all(8),
- // alignment: Alignment.center,
- // child: favLetters![index].toText14(color: selectedFavLetter == favLetters![index] ? MyColors.gradiantStartColor : Colors.black),
- // ).onPress(() {
- // selectedFavLetter = favLetters![index].toUpperCase();
- // fetchFavUsersList();
- // });
- // },
- // separatorBuilder: (BuildContext context, int index) {
- // return const SizedBox(height: 0);
- // },
- // physics: const NeverScrollableScrollPhysics(),
- // shrinkWrap: true,
- // itemCount: favLetters!.length,
- // ),
- // ),
+ if (favLetters != null)
+ Container(
+ width: 30,
+ // color: Colors.red,
+ child: ListView.separated(
+ itemBuilder: (context, index) {
+ return Container(
+ padding: EdgeInsets.all(8),
+ alignment: Alignment.center,
+ child: favLetters![index].toText14(color: selectedFavLetter == favLetters![index] ? MyColors.gradiantStartColor : Colors.black),
+ ).onPress(() {
+ selectedFavLetter = favLetters![index].toUpperCase();
+ fetchFavUsersList();
+ });
+ },
+ separatorBuilder: (context, index) {
+ return SizedBox(
+ height: 0,
+ );
+ },
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ itemCount: favLetters!.length,
+ ),
+ ),
],
),
],
@@ -409,15 +385,22 @@ class _DelegateSheetState extends State {
),
),
),
- Container(width: double.infinity, height: 1, color: MyColors.borderColor),
+ Container(
+ width: double.infinity,
+ height: 1,
+ color: MyColors.borderColor,
+ ),
DefaultButton(
"Cancel",
- () {
+ () {
Navigator.pop(context);
},
textColor: Colors.black,
- colors: const [Color(0xffE6E6E6), Color(0xffE6E6E6)],
- ).insideContainer,
+ colors: [
+ Color(0xffE6E6E6),
+ Color(0xffE6E6E6),
+ ],
+ ).insideContainer
],
),
);
@@ -427,22 +410,25 @@ class _DelegateSheetState extends State {
return InkWell(
onTap: () {
Navigator.pop(context);
- showMyBottomSheet(
- context,
- callBackFunc: widget.callBackFunc,
- child: SelectedItemSheet(
- "Comment",
- apiMode: widget.apiMode,
- actionHistoryList: actionHistory,
- notificationID: widget.notificationID,
- isITGRequest: widget.wFHistory != null,
- getNotificationRespondAttributes: widget.getNotificationRespondAttributes,
- ),
- );
+ showMyBottomSheet(context,
+ callBackFunc: widget.callBackFunc,
+ child: SelectedItemSheet(
+ "Comment",
+ apiMode: widget.apiMode,
+ actionHistoryList: actionHistory,
+ notificationID: widget.notificationID,
+ isITGRequest: widget.wFHistory != null,
+ getNotificationRespondAttributes: widget.getNotificationRespondAttributes,
+ ));
},
child: Row(
- children: [
- CircularAvatar(url: actionHistory.eMPLOYEEIMAGE ?? "", height: 30, width: 30, isImageBase64: true),
+ children: [
+ CircularAvatar(
+ url: actionHistory.eMPLOYEEIMAGE ?? "",
+ height: 30,
+ width: 30,
+ isImageBase64: true,
+ ),
9.width,
(actionHistory.nAME ?? "").toText12().expanded,
IconButton(
@@ -458,8 +444,12 @@ class _DelegateSheetState extends State {
isFav: true,
);
},
- icon: Icon(Icons.star, size: 16, color: (actionHistory.isFavorite ?? false) ? MyColors.yellowColor : MyColors.borderColor),
- ),
+ icon: Icon(
+ Icons.star,
+ size: 16,
+ color: (actionHistory.isFavorite ?? false) ? MyColors.yellowColor : MyColors.borderColor,
+ ),
+ )
],
),
);
@@ -469,18 +459,25 @@ class _DelegateSheetState extends State {
return InkWell(
onTap: () {
Navigator.pop(context);
- showMyBottomSheet(
- context,
- callBackFunc: widget.callBackFunc,
- child: SelectedItgItemSheet(
- "Comment",
- apiMode: widget.apiMode,
- wfHistory: wfHistory,
- // notificationID: widget.notificationID,
- ),
- );
+ showMyBottomSheet(context,
+ callBackFunc: widget.callBackFunc,
+ child: SelectedItgItemSheet(
+ "Comment",
+ apiMode: widget.apiMode,
+ wfHistory: wfHistory,
+ // notificationID: widget.notificationID,
+ ));
},
- child: Row(children: [CircularAvatar(height: 30, width: 30), 9.width, (wfHistory.name ?? "").toText12().expanded]),
+ child: Row(
+ children: [
+ CircularAvatar(
+ height: 30,
+ width: 30,
+ ),
+ 9.width,
+ (wfHistory.name ?? "").toText12().expanded,
+ ],
+ ),
);
}
@@ -488,31 +485,47 @@ class _DelegateSheetState extends State {
return InkWell(
onTap: () {
Navigator.pop(context);
- showMyBottomSheet(
- context,
- callBackFunc: widget.callBackFunc,
- child: SelectedItemSheet(
- "Comment",
- apiMode: widget.apiMode,
- favoriteReplacements: actionHistory,
- notificationID: widget.notificationID,
- isITGRequest: widget.wFHistory != null,
- getNotificationRespondAttributes: widget.getNotificationRespondAttributes,
- ),
- );
+ showMyBottomSheet(context,
+ callBackFunc: widget.callBackFunc,
+ child: SelectedItemSheet(
+ "Comment",
+ apiMode: widget.apiMode,
+ favoriteReplacements: actionHistory,
+ notificationID: widget.notificationID,
+ isITGRequest: widget.wFHistory != null,
+ getNotificationRespondAttributes: widget.getNotificationRespondAttributes,
+ ));
},
child: Row(
- children: [
- actionHistory.employeeImage != "" && actionHistory.employeeImage != null
- ? CircularAvatar(url: actionHistory.employeeImage, height: 40, width: 40, isImageBase64: (actionHistory.employeeImage != null || actionHistory.employeeImage!.isNotEmpty) ? true : false)
+ children: [
+ actionHistory.employeeImage != ""
+ ? CircularAvatar(
+ url: actionHistory.employeeImage,
+ height: 40,
+ width: 40,
+ isImageBase64: (actionHistory.employeeImage != null || actionHistory.employeeImage!.isNotEmpty) ? true : false,
+ )
: isImageLoaded
- ? CircularAvatar(height: 40, width: 40, isImageBase64: false)
+ ? CircularAvatar(
+ height: 40,
+ width: 40,
+ isImageBase64: false,
+ )
: ClipRRect(
- borderRadius: const BorderRadius.all(Radius.circular(50)),
- child: Image.network("https://play-lh.googleusercontent.com/NPo88ojmhah4HDiposucJmfQIop4z4xc8kqJK9ITO9o-yCab2zxIp7PPB_XPj2iUojo", fit: BoxFit.cover, height: 40, width: 40).toShimmer(),
- ),
+ borderRadius: const BorderRadius.all(
+ Radius.circular(50),
+ ),
+ child: Image.network(
+ "https://play-lh.googleusercontent.com/NPo88ojmhah4HDiposucJmfQIop4z4xc8kqJK9ITO9o-yCab2zxIp7PPB_XPj2iUojo",
+ fit: BoxFit.cover,
+ height: 40,
+ width: 40,
+ ).toShimmer(),
+ ),
16.width,
- Expanded(child: (actionHistory.employeeDisplayName ?? "").toText12()),
+ Expanded(
+ child: (actionHistory.employeeDisplayName ?? "").toText12(),
+ ),
IconButton(
onPressed: () {
fetchChangeFav(
@@ -524,8 +537,12 @@ class _DelegateSheetState extends State {
isNeedToRefresh: true,
);
},
- icon: const Icon(Icons.star, size: 16, color: MyColors.yellowColor),
- ),
+ icon: Icon(
+ Icons.star,
+ size: 16,
+ color: MyColors.yellowColor,
+ ),
+ )
],
),
);
@@ -535,24 +552,29 @@ class _DelegateSheetState extends State {
return InkWell(
onTap: () {
Navigator.pop(context);
- showMyBottomSheet(
- context,
- callBackFunc: widget.callBackFunc,
- child: SelectedItemSheet(
- LocaleKeys.comments.tr(),
- apiMode: widget.apiMode,
- replacementList: actionHistory,
- notificationID: widget.notificationID,
- isITGRequest: widget.wFHistory != null,
- getNotificationRespondAttributes: widget.getNotificationRespondAttributes,
- ),
- );
+ showMyBottomSheet(context,
+ callBackFunc: widget.callBackFunc,
+ child: SelectedItemSheet(
+ LocaleKeys.comments.tr(),
+ apiMode: widget.apiMode,
+ replacementList: actionHistory,
+ notificationID: widget.notificationID,
+ isITGRequest: widget.wFHistory != null,
+ getNotificationRespondAttributes: widget.getNotificationRespondAttributes,
+ ));
},
child: Row(
- children: [
- CircularAvatar(url: actionHistory.employeeImage, height: 30, width: 30, isImageBase64: actionHistory.employeeImage != null ? true : false),
+ children: [
+ CircularAvatar(
+ url: actionHistory.employeeImage,
+ height: 30,
+ width: 30,
+ isImageBase64: actionHistory.employeeImage != null ? true : false,
+ ),
16.width,
- Expanded(child: (actionHistory.employeeDisplayName ?? "").toText12()),
+ Expanded(
+ child: (actionHistory.employeeDisplayName ?? "").toText12(),
+ ),
IconButton(
onPressed: () {
actionHistory.isFavorite = !(actionHistory.isFavorite ?? false);
@@ -565,8 +587,12 @@ class _DelegateSheetState extends State {
isNeedToRefresh: false,
);
},
- icon: Icon(Icons.star, size: 16, color: (actionHistory.isFavorite ?? false) ? MyColors.yellowColor : MyColors.borderColor),
- ),
+ icon: Icon(
+ Icons.star,
+ size: 16,
+ color: (actionHistory.isFavorite ?? false) ? MyColors.yellowColor : MyColors.borderColor,
+ ),
+ )
],
),
);
diff --git a/lib/widgets/sso_webview_widget.dart b/lib/widgets/sso_webview_widget.dart
index 070f270..5877a63 100644
--- a/lib/widgets/sso_webview_widget.dart
+++ b/lib/widgets/sso_webview_widget.dart
@@ -46,7 +46,7 @@ class _SsoLoginWebViewState extends State {
-
Redirecting...
diff --git a/pubspec.yaml b/pubspec.yaml
index 0149086..6abe6fc 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -17,8 +17,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-#version: 3.6.8+300078
-version: 3.9.2+1
+#version: 3.7.1+300081
+version: 3.9.3+1
environment:
sdk: ^3.7.0
@@ -56,7 +56,8 @@ dependencies:
logger: ^1.1.0
flutter_countdown_timer: ^4.1.0
- platform_device_id_plus: ^1.0.7
+# platform_device_id_plus: ^1.0.7
+ mobile_device_identifier: ^0.0.3
device_info_plus: ^11.5.0
image_picker: ^1.1.2
file_picker: ^8.3.1