development mode and external storage excluded from device security check.

design_3.0_demo_module
Sikander Saleem 1 year ago
parent c9b3538720
commit 880f1eb1f0

@ -172,20 +172,13 @@ class _SplashPageState extends State<SplashPage> {
Future<bool> 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;

@ -96,7 +96,6 @@ class _NfcLayoutState extends State<NfcLayout> {
SizedBox(
height: 30,
),
Image.asset(
"assets/images/ic_nfc.png",
height: MediaQuery.of(context).size.width / 3,

Loading…
Cancel
Save