diff --git a/.gitignore b/.gitignore index ad1bfc20..a0337610 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ migrate_working_dir/ .pub-cache/ .pub/ /build/ - +build/ # Web related lib/generated_plugin_registrant.dart @@ -44,16 +44,27 @@ app.*.symbols # Obfuscation related app.*.map.json -# Ignore gradle.properties file +# Android related +# Gradle files android/gradle.properties +android/.gradle/ +android/gradle/ +android/captures/ - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release -/android/gradle/wrapper/gradle-wrapper.properties -# Build files - should not be committed +# Build directories +android/app/debug/ +android/app/profile/ +android/app/release/ android/app/build/ android/build/ -build/ +**/android/**/build/ + +# Generated files +android/app/generated/ +android/app/build/generated/ +android/app/build/intermediates/ +android/app/build/outputs/ +# macOS +macos/Flutter/ephemeral/ +macos/Pods/ +macos/build/ diff --git a/android/.gitignore b/android/.gitignore index 6f568019..8bde0348 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -6,6 +6,21 @@ gradle-wrapper.jar /local.properties GeneratedPluginRegistrant.java +# Build directories +build/ +app/build/ +**/build/ + +# Generated files +app/generated/ +**/generated/ +**/intermediates/ +**/outputs/ + +# Cache +.gradle/ +.cxx/ + # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties diff --git a/android/gradle.properties b/android/gradle.properties index ea54c785..9fb38428 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,16 @@ org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m android.useAndroidX=true android.enableJetifier=true -dev.steenbakker.mobile_scanner.useUnbundled=true \ No newline at end of file +dev.steenbakker.mobile_scanner.useUnbundled=true + +# Gradle optimization and caching +org.gradle.caching=true +org.gradle.parallel=true +org.gradle.configureondemand=true + +# Kotlin compiler daemon +kotlin.compiler.execution.strategy=in-process +kotlin.incremental=true + +# File system watching +org.gradle.vfs.watch=true diff --git a/ios/.gitignore b/ios/.gitignore index b1811013..d6169196 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -27,6 +27,13 @@ Flutter/flutter_export_environment.sh ServiceDefinitions.json Runner/GeneratedPluginRegistrant.* +# Podfile.lock should be committed for apps, but ignored for libraries +Podfile.lock + +# Build directories +build/ +**/build/ + # Exceptions to above rules. !default.mode1v3 !default.mode2v3 diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index a161049c..8437ecf5 100644 --- a/lib/controllers/api_routes/urls.dart +++ b/lib/controllers/api_routes/urls.dart @@ -1,7 +1,7 @@ class URLs { URLs._(); - static const String appReleaseBuildNumber = "37"; + static const String appReleaseBuildNumber = "39"; static const host1 = "https://atomsm.hmg.com"; // production url // static const host1 = "https://atomsmdev.hmg.com"; // local DEV url diff --git a/lib/dashboard_latest/dashboard_view.dart b/lib/dashboard_latest/dashboard_view.dart index bf9b5a71..8d7fce09 100644 --- a/lib/dashboard_latest/dashboard_view.dart +++ b/lib/dashboard_latest/dashboard_view.dart @@ -141,7 +141,12 @@ class _DashboardViewState extends State { bottom: 20.toScreenHeight, child: GestureDetector( onTap: () async { - bool isNfcSupported = await NfcManager.instance.isAvailable(); + bool isNfcSupported = false; + try { + isNfcSupported = await NfcManager.instance.isAvailable(); + } catch (e) { + isNfcSupported = false; + } SwipeGeneralUtils.instance.showSwipeTypeBottomSheetSheet(isNfcSupported: isNfcSupported); }, child: CircularAnimatedContainer( diff --git a/lib/new_views/pages/land_page/non_hmg_employee_swipe_view.dart b/lib/new_views/pages/land_page/non_hmg_employee_swipe_view.dart index 0c0c4c14..a26c7965 100644 --- a/lib/new_views/pages/land_page/non_hmg_employee_swipe_view.dart +++ b/lib/new_views/pages/land_page/non_hmg_employee_swipe_view.dart @@ -24,7 +24,11 @@ class _NonHmgEmployeeSwipeViewState extends State { } void checkForNfcAndLocationPermission() async { - isNfcEnabled = await NfcManager.instance.isAvailable(); + try { + isNfcEnabled = await NfcManager.instance.isAvailable(); + } catch (e) { + isNfcEnabled = false; + } } @override diff --git a/lib/new_views/swipe_module/non_hmg_employee_swipe_view.dart b/lib/new_views/swipe_module/non_hmg_employee_swipe_view.dart index 8f392199..a26c7965 100644 --- a/lib/new_views/swipe_module/non_hmg_employee_swipe_view.dart +++ b/lib/new_views/swipe_module/non_hmg_employee_swipe_view.dart @@ -24,7 +24,11 @@ class _NonHmgEmployeeSwipeViewState extends State { } void checkForNfcAndLocationPermission() async { - isNfcEnabled = await NfcManager.instance.isAvailable(); + try { + isNfcEnabled = await NfcManager.instance.isAvailable(); + } catch (e) { + isNfcEnabled = false; + } } @override @@ -52,7 +56,7 @@ class _NonHmgEmployeeSwipeViewState extends State { shrinkWrap: true, padding: const EdgeInsets.only(bottom: 0, top: 16), gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 16, mainAxisSpacing: 16), + SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 16, mainAxisSpacing: 16), children: [ gridItem("Nfc", Icons.nfc, isNfcEnabled).onPress(isNfcEnabled ? () {} : null), gridItem("Qr Scan", Icons.qr_code, true).onPress(() {}), diff --git a/lib/new_views/swipe_module/swipe_view.dart b/lib/new_views/swipe_module/swipe_view.dart index e6412ea4..10515900 100644 --- a/lib/new_views/swipe_module/swipe_view.dart +++ b/lib/new_views/swipe_module/swipe_view.dart @@ -124,7 +124,12 @@ class _SwipeViewState extends State { bottom: 60.toScreenHeight, child: GestureDetector( onTap: () async { - bool isNfcSupported = await NfcManager.instance.isAvailable(); + bool isNfcSupported = false; + try { + isNfcSupported = await NfcManager.instance.isAvailable(); + } catch (e) { + isNfcSupported = false; + } SwipeGeneralUtils.instance.showSwipeTypeBottomSheetSheet(isNfcSupported: isNfcSupported); }, child: CircularAnimatedContainer( diff --git a/lib/new_views/swipe_module/utils/swipe_general_utils.dart b/lib/new_views/swipe_module/utils/swipe_general_utils.dart index ee087dee..58343f4a 100644 --- a/lib/new_views/swipe_module/utils/swipe_general_utils.dart +++ b/lib/new_views/swipe_module/utils/swipe_general_utils.dart @@ -371,9 +371,9 @@ class SwipeGeneralUtils { Future performQrCodeAttendance({double? latitude, double? longitude, required BuildContext context}) async { UserProvider userProvider = Provider.of(context, listen: false); - String qrCodeValue = await Navigator.of(context).push( + String? qrCodeValue = await Navigator.of(context).push( MaterialPageRoute(builder: (_) => const ScanQr()), - ) as String; + ) as String?; if (qrCodeValue != null) { showLoading(context); diff --git a/pubspec.yaml b/pubspec.yaml index 522bac4e..38ad5def 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.7.3+38 +version: 1.7.4+39 environment: sdk: ">=3.5.0 <4.0.0"