safe_device

Creator: coderz1093

Last updated:

Add to Cart

Description:

safe device

safe_device (Null-Safety) #


Flutter (Null-Safety) Jailbroken, root, emulator and mock location detection.
Getting Started #
In your flutter project add the dependency:
dependencies:
...
safe_device: ^1.1.8
copied to clipboard
Usage #
Importing package
import 'package:safe_device/safe_device.dart';
copied to clipboard
Using it
Checks whether device JailBroken on iOS/Android?
bool isJailBroken = await SafeDevice.isJailBroken;
copied to clipboard
Checks whether device is real or emulator
bool isRealDevice = await SafeDevice.isRealDevice;
copied to clipboard
Can this device mock location - no need to root!
bool isMockLocation = await SafeDevice.isMockLocation;
copied to clipboard
(ANDROID ONLY) Check if application is running on external storage
bool isOnExternalStorage = await SafeDevice.isOnExternalStorage;
copied to clipboard
Check if device violates any of the above
bool isSafeDevice = await SafeDevice.isSafeDevice;
copied to clipboard
(ANDROID ONLY) Check if development Options is enable on device
bool isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable;
copied to clipboard
Note: #
Mock location detection

Android - Location permission needs to be granted in app in order to detect mock location
properly
iOS - For now we are checking if device is Jail Broken or if it's not real device. There is no
strong detection of mock location in iOS (Open the PR if you have better way for mock location
detection in iOS)

DevelopmentMode #

-Development Options in emulator always is true for default

❗Since emulators are usually rooted, you might want to bypass these checks during development. Unless you're keen on constant false alarms ⏰ #

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.