diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 7ca764b..f6164da 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -140,6 +140,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, AAF25E5FC427CABFCDCC628C /* [CP] Embed Pods Frameworks */, + 8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -156,7 +157,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -234,6 +235,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 8E1FBB2EA6B3AEDD9488054A /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -358,7 +376,10 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -482,7 +503,10 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -501,7 +525,10 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.mohemFlutterApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140c..3db53b6 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/lib/main.dart b/lib/main.dart index cd00082..b1e74db 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,7 @@ import 'dart:io'; import 'package:easy_localization/easy_localization.dart'; -import 'package:firebase_core/firebase_core.dart'; + import 'package:flutter/material.dart'; import 'package:logger/logger.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart'; @@ -24,7 +24,6 @@ var logger = Logger( Future main() async { WidgetsFlutterBinding.ensureInitialized(); await EasyLocalization.ensureInitialized(); - await Firebase.initializeApp(); AppState().setPostParamsModel( PostParamsModel(channel: 31, versionID: 5.0, mobileType: Platform.isAndroid ? "android" : "ios"), ); diff --git a/lib/models/profile_menu.model.dart b/lib/models/profile_menu.model.dart index c1b77b7..7005c88 100644 --- a/lib/models/profile_menu.model.dart +++ b/lib/models/profile_menu.model.dart @@ -1,6 +1,3 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - class ProfileMenu { final String name; final String icon; @@ -8,5 +5,6 @@ class ProfileMenu { final String dynamicUrl; final String functionName; final String requestID; + ProfileMenu({this.name = '', this.icon = '', this.route = '', this.dynamicUrl = '', this.functionName = '', this.requestID = ''}); } diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 2e7e769..4406a4d 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -324,7 +326,7 @@ class _DashboardScreenState extends State { child: AppDrawer(), ), bottomNavigationBar: SizedBox( - height: 70, + height: Platform.isAndroid ? 70 : 100, child: BottomNavigationBar( items: [ BottomNavigationBarItem( diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index d02fd74..a2ef87a 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/src/public_ext.dart'; +import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -23,7 +24,6 @@ import 'package:mohem_flutter_app/models/member_login_list_model.dart'; import 'package:mohem_flutter_app/models/privilege_list_model.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; import 'package:mohem_flutter_app/widgets/input_widget.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class LoginScreen extends StatefulWidget { LoginScreen({Key? key}) : super(key: key); @@ -41,7 +41,7 @@ class _LoginScreenState extends State { CheckMobileAppVersionModel? _checkMobileAppVersion; MemberLoginListModel? _memberLoginList; - final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; + late final FirebaseMessaging _firebaseMessaging; bool _autoLogin = false; @@ -75,6 +75,8 @@ class _LoginScreenState extends State { Future checkFirebaseToken() async { try { Utils.showLoading(context); + await Firebase.initializeApp(); + _firebaseMessaging = FirebaseMessaging.instance; firebaseToken = await _firebaseMessaging.getToken(); loginInfo = await LoginApiClient().getMobileLoginInfoNEW(firebaseToken ?? "", Platform.isAndroid ? "android" : "ios"); if (loginInfo == null) { @@ -88,7 +90,7 @@ class _LoginScreenState extends State { } } catch (ex) { Utils.hideLoading(context); - Utils.handleException(ex, context, null); + Utils.handleException(ex, context, (errorMsg){}); } } diff --git a/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart b/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart index a88e041..051d72a 100644 --- a/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart +++ b/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart @@ -176,7 +176,6 @@ class _DynamicInputScreenState extends State { List> getDefaultValuesIonicLogic(GetEITDFFStructureList structureElement) { try { - Utils.showLoading(context); List parentValue = structureElement.pARENTSEGMENTSVSSplitedVS ?? []; List parentsList = structureElement.pARENTSEGMENTSDVSplited ?? []; @@ -718,7 +717,7 @@ class _DynamicInputScreenState extends State { Future _selectDate(BuildContext context) async { DateTime time = selectedDate; - if (!Platform.isIOS) { + if (Platform.isIOS) { await showCupertinoModalPopup( context: context, builder: (cxt) => Container( @@ -749,7 +748,7 @@ class _DynamicInputScreenState extends State { Future _selectTime(BuildContext context) async { TimeOfDay time = TimeOfDay(hour: selectedDate.hour, minute: selectedDate.minute); - if (!Platform.isIOS) { + if (Platform.isIOS) { await showCupertinoModalPopup( context: context, builder: (cxt) => Container(