WD: flutter upgrade fron 3.7 to 3.19.0

payment_worklist_CR_6939
taha.alam 1 year ago
parent 096c52d979
commit 2bdaaf9e16

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

@ -67,6 +67,7 @@ class OtpDialog {
// projectProvider = Provider.of(context);
return Dialog(
backgroundColor: Colors.white,
surfaceTintColor: Colors.transparent,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
insetPadding: const EdgeInsets.only(left: 21, right: 21),
child: StatefulBuilder(builder: (context, setState) {

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/theme/colors.dart';
@ -26,7 +27,6 @@ class AppTheme {
splashColor: Colors.transparent,
primaryColor: primaryColor,
primaryColorDark: primaryColor,
buttonColor: Colors.black,
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
bottomSheetTheme: const BottomSheetThemeData(
@ -44,7 +44,7 @@ class AppTheme {
floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
appBarTheme: AppBarTheme(
color: const Color(0xff515A5D),
brightness: Brightness.light,
systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
elevation: 0.0,
actionsIconTheme: IconThemeData(
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/widgets/app_bar_widget.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:syncfusion_flutter_calendar/calendar.dart';
@ -117,8 +117,8 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
confirmWidget: Text(LocaleKeys.confirm.tr()),
cancelWidget: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) {
if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month);

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

@ -4,8 +4,9 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.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_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/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
@ -63,6 +64,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
return Scaffold(
appBar: AppBar(
surfaceTintColor: Colors.transparent,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
@ -219,11 +221,17 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
Future<bool> loginWithFaceIDAndBiometrics() async {
IOSAuthMessages iosStrings =
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
IOSAuthMessages iosStrings = const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false;
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) {
print(e);
Utils.hideLoading(context);
@ -233,7 +241,17 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint)));
bool isDisable = false;
if(_flag >= 3 && _flag <= 4) {
bool isFaceEnabled = (_flag == 3 && (checkBiometricIsAvailable(BiometricType.face) ||
checkBiometricIsAvailable(BiometricType.weak)));
bool isThumbEnabled =
(_flag == 4 && (checkBiometricIsAvailable(BiometricType.fingerprint) ||
checkBiometricIsAvailable(BiometricType.strong)));
isDisable = !(isFaceEnabled || isThumbEnabled);
}
return InkWell(
onTap: isDisable
? null

@ -4,7 +4,8 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth/local_auth.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -516,7 +517,11 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false;
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) {
print(e);
Utils.hideLoading(context);
@ -526,7 +531,17 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
}
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint)));
bool isDisable = false;
if(_flag >= 3 && _flag <= 4) {
bool isFaceEnabled = (_flag == 3 && (checkBiometricIsAvailable(BiometricType.face) ||
checkBiometricIsAvailable(BiometricType.weak)));
bool isThumbEnabled =
(_flag == 4 && (checkBiometricIsAvailable(BiometricType.fingerprint) ||
checkBiometricIsAvailable(BiometricType.strong)));
isDisable = !(isFaceEnabled || isThumbEnabled);
}
return InkWell(
onTap: isDisable
? null

@ -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/widgets/app_bar_widget.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:syncfusion_flutter_calendar/calendar.dart';
@ -169,8 +169,8 @@ class _ViewAttendanceState extends State<ViewAttendance> {
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
confirmWidget: Text(LocaleKeys.confirm.tr()),
cancelWidget: Text(LocaleKeys.cancel.tr()),
).then(
(selectedDate) {
if (selectedDate != null) {

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

@ -76,7 +76,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
: getOffersList[0].titleEn!.toText22(isBold: true, color: const Color(0xff2B353E)).center,
Html(
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!));
},
),

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

@ -13,6 +13,8 @@ AppBar ChatAppBarWidget(BuildContext context,
{required String title, bool showHomeButton = true, ChatUser? chatUser, bool showTyping = false, List<Widget>? actions, void Function()? onHomeTapped, void Function()? onBackTapped}) {
return AppBar(
leadingWidth: 0,
automaticallyImplyLeading: false,
surfaceTintColor: Colors.transparent,
title: Consumer<ChatProviderModel>(builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
return Row(
children: [

@ -80,6 +80,7 @@ class _NfcLayoutState extends State<NfcLayout> {
Widget scanNfc() {
return Container(
key: ValueKey(1),
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[

@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 3.4.4+300054
environment:
sdk: ">=2.16.0 <3.0.0"
sdk: ">=2.16.0 <3.5.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
@ -44,9 +44,9 @@ dependencies:
permission_handler: ^10.2.0
flutter_svg: any
sizer: ^2.0.15
local_auth: ^1.1.9
local_auth: ^2.2.0
fluttertoast: ^8.0.8
syncfusion_flutter_calendar: ^19.4.48
syncfusion_flutter_calendar: 21.2.9
# flutter_calendar_carousel: ^2.1.0
pie_chart: ^5.1.0
shared_preferences: ^2.0.12
@ -62,8 +62,8 @@ dependencies:
image_picker: ^0.8.5+3
file_picker: 5.2.5
geolocator: ^9.0.2
month_year_picker: ^0.2.0+1
month_picker_dialog_2: ^0.5.5
month_year_picker: ^0.3.0+1
month_picker_dialog: ^2.12.0
# open_file: ^3.2.1
open_filex: ^4.4.0
wifi_iot: ^0.3.18
@ -91,7 +91,7 @@ dependencies:
swipe_to: ^1.0.2
flutter_webrtc: ^0.9.17
camera: ^0.10.3
flutter_local_notifications: ^10.0.0
flutter_local_notifications: ^17.2.1+2
#firebase_analytics: any
#Chat Voice Message Recoding & Play
@ -119,7 +119,7 @@ dependencies:
#Huawei Specified
# store_checker: ^1.1.0
google_api_availability: ^3.0.1
google_maps_flutter_web: ^0.5.4
in_app_update: 3.0.0
#todo its for temporary purpose, later will remove this.

Loading…
Cancel
Save