From 880f1eb1f047811ab5ec5e0b90fb20b89d11a5c3 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 25 Feb 2025 09:39:33 +0300 Subject: [PATCH] development mode and external storage excluded from device security check. --- lib/new_views/pages/splash_page.dart | 9 +-------- lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart | 7 +++---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/new_views/pages/splash_page.dart b/lib/new_views/pages/splash_page.dart index 9cc574c8..b577179e 100644 --- a/lib/new_views/pages/splash_page.dart +++ b/lib/new_views/pages/splash_page.dart @@ -172,20 +172,13 @@ class _SplashPageState extends State { Future checkDeviceSafety() async { if (!kReleaseMode) return true; - bool isOnExternalStorage = false; - bool isDevelopmentModeEnable = false; bool isJailBroken = false; bool isRealDevice = false; try { isJailBroken = await SafeDevice.isJailBroken; isRealDevice = await SafeDevice.isRealDevice; - if (Platform.isAndroid) { - isOnExternalStorage = await SafeDevice.isOnExternalStorage; - isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable; - } - //TODO correct isDevelopmentModeEnable when publish to prod... - if (isJailBroken || !isRealDevice || isOnExternalStorage || isDevelopmentModeEnable) { + if (isJailBroken || !isRealDevice) { return false; } else { return true; diff --git a/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart b/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart index 76e108a3..0b26f9da 100644 --- a/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart +++ b/lib/new_views/swipe_module/dialoge/nfc_reader_sheet.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:nfc_manager/nfc_manager.dart'; import 'package:nfc_manager/platform_tags.dart'; -void showNfcReader(BuildContext context, { Function(String nfcId) ?onNcfScan}) { +void showNfcReader(BuildContext context, {Function(String nfcId)? onNcfScan}) { showModalBottomSheet( context: context, enableDrag: false, @@ -23,7 +23,7 @@ void showNfcReader(BuildContext context, { Function(String nfcId) ?onNcfScan}) { } class NfcLayout extends StatefulWidget { - Function(String nfcId) ?onNcfScan; + Function(String nfcId)? onNcfScan; NfcLayout({this.onNcfScan}); @@ -96,7 +96,6 @@ class _NfcLayoutState extends State { SizedBox( height: 30, ), - Image.asset( "assets/images/ic_nfc.png", height: MediaQuery.of(context).size.width / 3, @@ -159,7 +158,7 @@ class _NfcLayoutState extends State { ), Image.asset( // "assets/icons/nfc/ic_done.png", - "assets/images/ic_done.png", + "assets/images/ic_done.png", height: MediaQuery.of(context).size.width / 3, width: double.infinity, ),