WD: flutter upgraded to 3.27.4

flutter_upgrade
taha.alam 9 months ago
parent 5adc2bc64f
commit 5db63e571a

@ -0,0 +1,33 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18.141" height="24.326" viewBox="0 0 18.141 24.326">
<g id="biometrics" transform="translate(-76.645 0.102)">
<g id="Group_10711" data-name="Group 10711" transform="translate(76.745 -0.001)">
<g id="Group_10702" data-name="Group 10702" transform="translate(0.997 0)">
<path id="Path_13731" data-name="Path 13731" d="M92.682,4.276a.519.519,0,0,0,.373-.151,12.049,12.049,0,0,1,4.38-2.6c3.451-1.126,6.718-.255,9.7,2.573a.528.528,0,0,0,.746-.02.507.507,0,0,0,.144-.373.528.528,0,0,0-.164-.367A11.681,11.681,0,0,0,102.1.171a9.846,9.846,0,0,0-4.963.347,13.266,13.266,0,0,0-4.826,2.868.525.525,0,0,0-.157.373.519.519,0,0,0,.151.373A.574.574,0,0,0,92.682,4.276Z" transform="translate(-92.158 0.001)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10703" data-name="Group 10703" transform="translate(6.494 2.408)">
<path id="Path_13732" data-name="Path 13732" d="M227.426,62.967c-.537-3.457-1.9-5.939-4.053-7.366a9.5,9.5,0,0,0-6.98-1.139.526.526,0,0,0,.249,1.021,8.349,8.349,0,0,1,6.122,1c1.918,1.27,3.143,3.5,3.627,6.639a.539.539,0,0,0,.21.347.528.528,0,0,0,.308.1.318.318,0,0,0,.079-.007.531.531,0,0,0,.439-.6Z" transform="translate(-215.99 -54.236)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10704" data-name="Group 10704" transform="translate(0 3.288)">
<path id="Path_13733" data-name="Path 13733" d="M70.745,81.922c.471-5.513,4.132-6.783,4.289-6.836a.518.518,0,0,0,.3-.262.5.5,0,0,0,.026-.4.53.53,0,0,0-.668-.334c-.183.059-4.472,1.545-5,7.746a.53.53,0,0,0,.124.386.536.536,0,0,0,.36.183h.046a.545.545,0,0,0,.34-.124A.551.551,0,0,0,70.745,81.922Z" transform="translate(-69.688 -74.064)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10705" data-name="Group 10705" transform="translate(0.596 4.424)">
<path id="Path_13734" data-name="Path 13734" d="M85.763,106.351A7.125,7.125,0,0,1,87.3,102.73a5.731,5.731,0,0,1,2.1-1.6,5.122,5.122,0,0,1,2.665-.373,7.6,7.6,0,0,1,3.87,1.84.527.527,0,0,0,.74-.065.508.508,0,0,0,.118-.386.491.491,0,0,0-.19-.354,8.581,8.581,0,0,0-4.413-2.076,6.1,6.1,0,0,0-3.208.452,6.82,6.82,0,0,0-2.495,1.892,8.114,8.114,0,0,0-1.774,4.164,20.017,20.017,0,0,1-.511,2.757,3.9,3.9,0,0,1-.9,1.86.543.543,0,0,0-.19.36.555.555,0,0,0,.118.386.531.531,0,0,0,.406.19.521.521,0,0,0,.34-.124,4.747,4.747,0,0,0,1.244-2.39,21.652,21.652,0,0,0,.544-2.914Z" transform="translate(-83.109 -99.669)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10706" data-name="Group 10706" transform="translate(1.971 6.473)">
<path id="Path_13735" data-name="Path 13735" d="M125.938,152.379v-.007c-.052-.478-.1-.976-.151-1.4-.02-.17-.033-.275-.046-.38A4.981,4.981,0,0,0,124.307,147a4.777,4.777,0,0,0-2.377-1.12,4.646,4.646,0,0,0-2.167.151,4.453,4.453,0,0,0-1.971,1.283,6.3,6.3,0,0,0-1.434,3.241c-.007.026-.007.052-.013.072v.02a22.787,22.787,0,0,1-.9,4.367,6.623,6.623,0,0,1-1.165,2.514.543.543,0,0,0-.19.36.554.554,0,0,0,.118.386.543.543,0,0,0,.36.19.554.554,0,0,0,.386-.118,7.67,7.67,0,0,0,1.5-3.012,23.869,23.869,0,0,0,.949-4.6,5.31,5.31,0,0,1,1.179-2.711,3.32,3.32,0,0,1,1.506-.982,3.55,3.55,0,0,1,1.683-.111,3.692,3.692,0,0,1,1.846.864,4.191,4.191,0,0,1,1.087,2.92c.02.151.033.295.046.386.059.511.1.956.151,1.388a21.5,21.5,0,0,0,1.486,6.829.52.52,0,0,0,.478.308.514.514,0,0,0,.216-.046.528.528,0,0,0,.262-.694A20.806,20.806,0,0,1,125.938,152.379Z" transform="translate(-114.084 -145.821)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10707" data-name="Group 10707" transform="translate(3.013 8.548)">
<path id="Path_13736" data-name="Path 13736" d="M146.12,196.064a3.543,3.543,0,0,0-.537-2.449,2.455,2.455,0,0,0-1.08-.871,2.317,2.317,0,0,0-1.3-.138,2.291,2.291,0,0,0-1.44.917,4.445,4.445,0,0,0-.563,1.087,9.367,9.367,0,0,0-.386,1.434c-.079.413-.131.779-.177,1.126a8.913,8.913,0,0,1-.419,1.945,17.939,17.939,0,0,1-1.1,2.468,16.894,16.894,0,0,1-1.434,2.311.526.526,0,0,0,.458.858.5.5,0,0,0,.354-.19,17.82,17.82,0,0,0,1.552-2.482,18.717,18.717,0,0,0,1.165-2.619,10.284,10.284,0,0,0,.471-2.148c.046-.327.092-.668.17-1.067a7.909,7.909,0,0,1,.34-1.264,3.271,3.271,0,0,1,.426-.832,1.222,1.222,0,0,1,.779-.5,1.2,1.2,0,0,1,.707.079,1.388,1.388,0,0,1,.615.5,2.55,2.55,0,0,1,.347,1.742,22.62,22.62,0,0,1-1.46,5.284,25.8,25.8,0,0,1-2.573,5.271.53.53,0,0,0,.092.74.545.545,0,0,0,.321.111.518.518,0,0,0,.413-.2,26.528,26.528,0,0,0,2.724-5.546A23.906,23.906,0,0,0,146.12,196.064Z" transform="translate(-137.568 -192.57)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10708" data-name="Group 10708" transform="translate(14.291 8.495)">
<path id="Path_13737" data-name="Path 13737" d="M393.392,196.2a13.938,13.938,0,0,0-.773-4.518.526.526,0,0,0-.963.426,13.269,13.269,0,0,1,.681,4.158,11.225,11.225,0,0,0,.8,4.315.511.511,0,0,0,.314.255.6.6,0,0,0,.151.02.488.488,0,0,0,.249-.065.511.511,0,0,0,.255-.314.5.5,0,0,0-.046-.4A10.731,10.731,0,0,1,393.392,196.2Z" transform="translate(-391.612 -191.37)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10709" data-name="Group 10709" transform="translate(4.374 10.687)">
<path id="Path_13738" data-name="Path 13738" d="M173.334,241.3a.516.516,0,0,0-.138-.38.511.511,0,0,0-.367-.17.526.526,0,0,0-.55.5,19.166,19.166,0,0,1-1.2,5.762,14.612,14.612,0,0,1-2.711,4.59.529.529,0,0,0,.046.746.5.5,0,0,0,.347.131.523.523,0,0,0,.393-.177,15.861,15.861,0,0,0,2.914-4.917A20.284,20.284,0,0,0,173.334,241.3Z" transform="translate(-168.231 -240.745)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10710" data-name="Group 10710" transform="translate(8.472 16.753)">
<path id="Path_13739" data-name="Path 13739" d="M264.567,378.107l-.052-.262a.533.533,0,0,0-.347-.413.546.546,0,0,0-.406.02.529.529,0,0,0-.268.3l-.02.059c-.367,1.035-.727,2.049-1.179,3.064a19.518,19.518,0,0,1-1.676,3.077.522.522,0,0,0-.079.393.513.513,0,0,0,.223.334.539.539,0,0,0,.295.092.529.529,0,0,0,.439-.229,20.72,20.72,0,0,0,1.768-3.241c.2-.458.4-.943.609-1.5a11.594,11.594,0,0,0,1.146,2.92.519.519,0,0,0,.314.249.53.53,0,0,0,.4-.046.537.537,0,0,0,.249-.314.53.53,0,0,0-.046-.4A13.648,13.648,0,0,1,264.567,378.107Z" transform="translate(-260.531 -377.402)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

@ -35,7 +35,7 @@ class AppNotifications {
await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true); await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>(); AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
bool? granted = await androidImplementation?.requestPermission(); bool? granted = await androidImplementation?.requestNotificationsPermission();
if (granted == false) { if (granted == false) {
if (kDebugMode) { if (kDebugMode) {
print("-------------------- Permission Granted ------------------------"); print("-------------------- Permission Granted ------------------------");

@ -202,11 +202,11 @@ class OtpDialog {
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(Radius.circular(10.0)), borderRadius: const BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: Theme.of(context).colorScheme.error),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(Radius.circular(10.0)), borderRadius: const BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: Theme.of(context).colorScheme.error),
), ),
); );
} }

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/theme/colors.dart'; import 'package:mohem_flutter_app/theme/colors.dart';
@ -15,36 +16,84 @@ class AppTheme {
}, },
), ),
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
colorScheme: ColorScheme.fromSwatch(accentColor: MyColors.backgroundColor), colorScheme: ColorScheme.fromSwatch(
accentColor: MyColors.backgroundColor,
errorColor: const Color.fromRGBO(235, 80, 60, 1.0),
),
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: const Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: MyColors.backgroundColor, scaffoldBackgroundColor: MyColors.backgroundColor,
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey), textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey),
canvasColor: Colors.white, canvasColor: Colors.white,
backgroundColor: const Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4), highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: primaryColor, primaryColor: primaryColor,
primaryColorDark: primaryColor, primaryColorDark: primaryColor,
buttonColor: Colors.black, buttonTheme: ButtonThemeData(
toggleableActiveColor: secondaryColor, buttonColor: Colors.black,
),
switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return secondaryColor;
}
return null;
}),
trackColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return secondaryColor;
}
return null;
}),
),
radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return secondaryColor;
}
return null;
}),
),
checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return secondaryColor;
}
return null;
}),
),
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: const BottomSheetThemeData( bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: Color(0xFFE0E0E0), backgroundColor: Color(0xFFE0E0E0),
), ),
primaryTextTheme: const TextTheme(
bodyText2: TextStyle(color: Colors.white),
),
iconTheme: const IconThemeData(color: MyColors.darkIconColor), iconTheme: const IconThemeData(color: MyColors.darkIconColor),
textTheme: const TextTheme( textTheme: const TextTheme(
bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6), bodyMedium: TextStyle(color: Colors.black, letterSpacing: 0.6),
headline1: TextStyle(color: Colors.white, letterSpacing: 0.6), headlineSmall: TextStyle(color: Colors.white, letterSpacing: 0.6),
headline2: TextStyle(color: Colors.white, letterSpacing: 0.6), headlineMedium: TextStyle(color: Colors.white, letterSpacing: 0.6),
), ),
floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
appBarTheme: AppBarTheme(
appBarTheme: AppBarTheme(
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarBrightness: Brightness.light,
),
color: const Color(0xff515A5D), color: const Color(0xff515A5D),
brightness: Brightness.light,
elevation: 0.0, elevation: 0.0,
actionsIconTheme: IconThemeData( actionsIconTheme: IconThemeData(
color: Colors.grey[800], color: Colors.grey[800],

@ -16,7 +16,7 @@ import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart'; import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart'; import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
import 'package:month_picker_dialog_2/month_picker_dialog_2.dart'; import 'package:month_picker_dialog/month_picker_dialog.dart';
import 'package:pie_chart/pie_chart.dart'; import 'package:pie_chart/pie_chart.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart';
@ -117,8 +117,6 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
initialDate: formattedDate, initialDate: formattedDate,
firstDate: DateTime(searchYear - 2), firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(), lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) { ).then((selectedDate) {
if (selectedDate != null) { if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month); searchMonth = getMonth(selectedDate.month);

@ -214,6 +214,8 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
}, },
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
backgroundColor: Colors.transparent,
elevation: 0,
child: Container( child: Container(
width: 60, width: 60,
height: 60, height: 60,

@ -4,8 +4,9 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart'; import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
@ -69,7 +70,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false) title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() { ? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: BusinessCardDialog()); showMDialog(context, child: const BusinessCardDialog());
}) })
: Container(), : Container(),
actions: [ actions: [
@ -93,7 +94,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.welcomeBack.tr().toText12(), LocaleKeys.welcomeBack.tr().toText12(),
mobileLoginInfoListModel!.employeeName!.toText24(isBold: true), mobileLoginInfoListModel?.employeeName?.toText24(isBold: true) ?? const SizedBox.shrink(),
10.height, 10.height,
LocaleKeys.wouldYouLikeToLoginWithCurrentUsername.tr().toText16(), LocaleKeys.wouldYouLikeToLoginWithCurrentUsername.tr().toText16(),
Container( Container(
@ -126,7 +127,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
children: [ children: [
LocaleKeys.verificationType.tr().toText10(color: MyColors.grey57Color), LocaleKeys.verificationType.tr().toText10(color: MyColors.grey57Color),
getVerificationType(mobileLoginInfoListModel!.loginType!).toText12(), getVerificationType(mobileLoginInfoListModel!.loginType!).toText12(),
Expanded(child: SizedBox()), const Expanded(child: SizedBox()),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!)).toText12(), DateUtil.formatDateToTime(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!)).toText12(),
], ],
) )
@ -225,7 +226,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false; bool authenticated = false;
try { try {
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, biometricOnly: true, iOSAuthStrings: iosStrings); authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate',
options: const AuthenticationOptions(
useErrorDialogs: true, stickyAuth: true, biometricOnly: true,
),authMessages: [iosStrings,const AndroidAuthMessages(),]);
} on PlatformException catch (e) { } on PlatformException catch (e) {
print(e); print(e);
Utils.hideLoading(context); Utils.hideLoading(context);
@ -235,7 +239,8 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} }
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint))); bool isDisable = (_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) ||
_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint) && _flag == 4 && !checkBiometricIsAvailable(BiometricType.strong));
return InkWell( return InkWell(
onTap: isDisable onTap: isDisable
? null ? null

@ -4,8 +4,9 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart'; import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
@ -90,6 +91,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
Future<void> _getAvailableBiometrics() async { Future<void> _getAvailableBiometrics() async {
try { try {
_availableBioMetricType = await auth.getAvailableBiometrics(); _availableBioMetricType = await auth.getAvailableBiometrics();
print("the available biometric are ${_availableBioMetricType.length}");
} on PlatformException catch (e) { } on PlatformException catch (e) {
// AppToast.showErrorToast(message: e.message); // AppToast.showErrorToast(message: e.message);
print(e); print(e);
@ -516,7 +518,14 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false; bool authenticated = false;
try { try {
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, biometricOnly: true, iOSAuthStrings: iosStrings); authenticated = await auth.authenticate(
localizedReason: 'Scan your fingerprint to authenticate',
options: const AuthenticationOptions(
useErrorDialogs: true,
stickyAuth: true,
biometricOnly: true,
),
authMessages: [iosStrings, const AndroidAuthMessages()]);
} on PlatformException catch (e) { } on PlatformException catch (e) {
print(e); print(e);
Utils.hideLoading(context); Utils.hideLoading(context);
@ -526,7 +535,25 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} }
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint))); bool isDisable = (_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) ||
_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint) && _flag == 4 && !checkBiometricIsAvailable(BiometricType.strong));
// bool isDisable = false;
// switch (_flag) {
// case 3:
// isDisable = !(checkBiometricIsAvailable(BiometricType.face) ||
// checkBiometricIsAvailable(BiometricType.weak));
// break;
// case 4:
// isDisable = !(checkBiometricIsAvailable(BiometricType.fingerprint) ||
// checkBiometricIsAvailable(BiometricType.strong));
// break;
// }
// // bool isDisable = ((_flag == 3 &&
// // (!checkBiometricIsAvailable(BiometricType.face) ||
// // !checkBiometricIsAvailable(BiometricType.weak))) ||
// // (_flag == 4 &&
// // (!checkBiometricIsAvailable(BiometricType.fingerprint) ||
// // !checkBiometricIsAvailable(BiometricType.strong))));
return InkWell( return InkWell(
onTap: isDisable onTap: isDisable
? null ? null
@ -596,8 +623,13 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
bool checkBiometricIsAvailable(BiometricType biometricType) { bool checkBiometricIsAvailable(BiometricType biometricType) {
bool isAvailable = false; bool isAvailable = false;
print("the given biometric is $biometricType");
for (int i = 0; i < _availableBioMetricType.length; i++) { for (int i = 0; i < _availableBioMetricType.length; i++) {
print("the current biometric is ${_availableBioMetricType[i]}");
if (biometricType == _availableBioMetricType[i]) { if (biometricType == _availableBioMetricType[i]) {
print("the data is available $biometricType");
isAvailable = true; isAvailable = true;
break; break;
} }

@ -15,7 +15,7 @@ import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart'; import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart'; import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
import 'package:month_picker_dialog_2/month_picker_dialog_2.dart'; import 'package:month_picker_dialog/month_picker_dialog.dart';
import 'package:pie_chart/pie_chart.dart'; import 'package:pie_chart/pie_chart.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart';
@ -169,8 +169,6 @@ class _ViewAttendanceState extends State<ViewAttendance> {
initialDate: formattedDate, initialDate: formattedDate,
firstDate: DateTime(searchYear - 2), firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(), lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
).then( ).then(
(selectedDate) { (selectedDate) {
if (selectedDate != null) { if (selectedDate != null) {

@ -115,8 +115,8 @@ class _DeleteFamilyMemberState extends State<DeleteFamilyMember> {
padding: EdgeInsets.only(left: 50, right: 50), padding: EdgeInsets.only(left: 50, right: 50),
child: TextButton( child: TextButton(
style: TextButton.styleFrom( style: TextButton.styleFrom(
primary: MyColors.white, foregroundColor: MyColors.white,
onSurface: MyColors.white, surfaceTintColor: MyColors.white,
backgroundColor: MyColors.gradiantEndColor, backgroundColor: MyColors.gradiantEndColor,
), ),
onPressed: () { onPressed: () {

@ -76,7 +76,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
: getOffersList[0].titleEn!.toText22(isBold: true, color: const Color(0xff2B353E)).center, : getOffersList[0].titleEn!.toText22(isBold: true, color: const Color(0xff2B353E)).center,
Html( Html(
data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "", data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "",
onLinkTap: (String? url, RenderContext context, Map<String, String> attributes, _) { onLinkTap: (String? url, Map<String, String> attributes, _) {
launchUrl(Uri.parse(url!)); launchUrl(Uri.parse(url!));
}, },
), ),

@ -188,7 +188,7 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
LineChartData drawLineChart(List<FlSpot> spots, List<GetPoItemHistoryList> reversedList) { LineChartData drawLineChart(List<FlSpot> spots, List<GetPoItemHistoryList> reversedList) {
return LineChartData( return LineChartData(
lineTouchData: LineTouchData(enabled: true, touchTooltipData: LineTouchTooltipData(tooltipBgColor: Colors.grey[300])), lineTouchData: LineTouchData(enabled: true, touchTooltipData: LineTouchTooltipData()),
gridData: FlGridData( gridData: FlGridData(
show: true, show: true,
drawHorizontalLine: true, drawHorizontalLine: true,
@ -211,7 +211,7 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
interval: 1, interval: 1,
getTitlesWidget: (double value, TitleMeta meta) { getTitlesWidget: (double value, TitleMeta meta) {
return SideTitleWidget( return SideTitleWidget(
axisSide: meta.axisSide, meta: meta,
child: Text(reversedList[int.parse(meta.formattedValue)].cREATIONDATE!, style: TextStyle(fontSize: 10)), child: Text(reversedList[int.parse(meta.formattedValue)].cREATIONDATE!, style: TextStyle(fontSize: 10)),
); );
})), })),
@ -222,7 +222,7 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
interval: 1, interval: 1,
getTitlesWidget: (double value, TitleMeta meta) { getTitlesWidget: (double value, TitleMeta meta) {
return SideTitleWidget( return SideTitleWidget(
axisSide: meta.axisSide, meta: meta,
child: Text(meta.formattedValue, style: TextStyle(fontSize: 10)), child: Text(meta.formattedValue, style: TextStyle(fontSize: 10)),
); );
})), })),
@ -233,7 +233,7 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
reservedSize: 15, reservedSize: 15,
getTitlesWidget: (double value, TitleMeta meta) { getTitlesWidget: (double value, TitleMeta meta) {
return SideTitleWidget( return SideTitleWidget(
axisSide: meta.axisSide, meta: meta,
child: Text("", style: TextStyle(fontSize: 10)), child: Text("", style: TextStyle(fontSize: 10)),
); );
})), })),

@ -15,6 +15,8 @@ AppBar AppBarWidget(BuildContext context,
void Function()? onBackTapped}) { void Function()? onBackTapped}) {
return AppBar( return AppBar(
leadingWidth: 0, leadingWidth: 0,
automaticallyImplyLeading: false,
title: Row( title: Row(
children: [ children: [
GestureDetector( GestureDetector(

@ -159,7 +159,7 @@ class _BottomSheet extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: const EdgeInsets.symmetric(vertical: 12.0), padding: const EdgeInsets.symmetric(vertical: 12.0),
decoration: BoxDecoration(color: Theme.of(context).backgroundColor, borderRadius: const BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))), decoration: BoxDecoration(color: Theme.of(context).scaffoldBackgroundColor, borderRadius: const BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))),
child: SafeArea( child: SafeArea(
top: false, top: false,
child: Column( child: Column(

@ -78,9 +78,11 @@ class _NfcLayoutState extends State<NfcLayout> {
} }
Widget scanNfc() { Widget scanNfc() {
return Container( return SizedBox(
key: ValueKey(1), width: MediaQuery.sizeOf(context).width,
child: Column( child: Column(
key: ValueKey(1),
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
@ -138,8 +140,9 @@ class _NfcLayoutState extends State<NfcLayout> {
Widget doneNfc() { Widget doneNfc() {
return Container( return Container(
key: ValueKey(2), width: MediaQuery.sizeOf(context).width,
child: Column( child: Column(
key: ValueKey(2),
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(

@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 3.7.98+3 version: 3.7.98+3
environment: environment:
sdk: ">=2.16.0 <3.0.0" sdk: ">=2.16.0 <3.7.0"
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
@ -40,13 +40,13 @@ dependencies:
injector: ^2.0.0 injector: ^2.0.0
provider: ^6.0.1 provider: ^6.0.1
easy_localization: ^3.0.0 easy_localization: ^3.0.0
http: ^0.13.4 http: ^1.3.0
permission_handler: ^10.2.0 permission_handler: ^10.2.0
flutter_svg: any flutter_svg: any
sizer: ^2.0.15 sizer: ^2.0.15
local_auth: ^1.1.9 local_auth: ^2.3.0
fluttertoast: ^8.0.8 fluttertoast: ^8.0.8
syncfusion_flutter_calendar: ^19.4.48 syncfusion_flutter_calendar: ^28.2.4
# flutter_calendar_carousel: ^2.1.0 # flutter_calendar_carousel: ^2.1.0
pie_chart: ^5.1.0 pie_chart: ^5.1.0
shared_preferences: ^2.0.12 shared_preferences: ^2.0.12
@ -60,12 +60,12 @@ dependencies:
# android_id: ^0.1.3+1 # android_id: ^0.1.3+1
platform_device_id: ^1.0.1 platform_device_id: ^1.0.1
image_picker: ^0.8.5+3 image_picker: ^0.8.5+3
file_picker: 5.2.5 file_picker: ^8.3.1
geolocator: ^9.0.2 geolocator: ^9.0.2
month_year_picker: ^0.2.0+1 month_year_picker: ^0.4.0+1
month_picker_dialog_2: ^0.5.5 month_picker_dialog: ^6.0.3
# open_file: ^3.2.1 # open_file: ^3.2.1
open_filex: ^4.4.0 open_filex: ^4.6.0
wifi_iot: ^0.3.19+1 wifi_iot: ^0.3.19+1
flutter_html: ^3.0.0-alpha.6 flutter_html: ^3.0.0-alpha.6
# flutter_barcode_scanner: ^2.0.0 # flutter_barcode_scanner: ^2.0.0
@ -76,7 +76,7 @@ dependencies:
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
auto_size_text: ^3.0.0 auto_size_text: ^3.0.0
pull_to_refresh: ^2.0.0 pull_to_refresh: ^2.0.0
fl_chart: ^0.62.0 fl_chart: ^0.70.2
# lottie json animations # lottie json animations
lottie: any lottie: any
# Marathon Card Swipe # Marathon Card Swipe
@ -93,7 +93,7 @@ dependencies:
swipe_to: ^1.0.2 swipe_to: ^1.0.2
flutter_webrtc: ^0.9.17 flutter_webrtc: ^0.9.17
camera: ^0.10.3 camera: ^0.10.3
flutter_local_notifications: ^10.0.0 flutter_local_notifications: ^18.0.1
#firebase_analytics: any #firebase_analytics: any
#Chat Voice Message Recoding & Play #Chat Voice Message Recoding & Play
@ -116,7 +116,7 @@ dependencies:
firebase_crashlytics: ^2.9.0 firebase_crashlytics: ^2.9.0
#Items for sale Image Carousel Slider #Items for sale Image Carousel Slider
carousel_slider: ^4.2.1 carousel_slider: ^5.0.0
#Huawei Specified #Huawei Specified
# store_checker: ^1.1.0 # store_checker: ^1.1.0

Loading…
Cancel
Save