device_safety_info

Creator: coderz1093

Last updated:

0 purchases

device_safety_info Image
device_safety_info Images

Languages

Categories

Add to Cart

Description:

device safety info

device_safety_info (Null-Safety) #
Flutter JailBreak, Rooted, Emulator/Simulator, External storage and Screen Lock detection.
Getting Started #
In your flutter project add the dependency:
dependencies:

device_safety_info: ^0.0.5
copied to clipboard
Usage #
Importing package
import 'package:devicesafetyinfo/device_safety_info.dart';
copied to clipboard
Using it
Checks whether device JailBroken or Rooted on iOS/Android?
bool isRootedDevice = await DeviceSafetyInfo.isRootedDevice;
copied to clipboard
Checks whether device is Real or Emulator/Simulator
bool isRealDevice = await DeviceSafetyInfo.isRealDevice;
copied to clipboard
Checks whether screen lock enabled or disabled
bool isScreenLock = await DeviceSafetyInfo.isScreenLock;
copied to clipboard
Checks whether application is running on external storage (Android Only)
bool isExternalStorage = await DeviceSafetyInfo.isExternalStorage;
copied to clipboard
Checks whether development Options is enable on device (Android Only)
bool isDeveloperMode = await DeviceSafetyInfo.isDeveloperMode;
copied to clipboard
Checks VPN status on device
For checking VPN status device must need to connected with the internet
For android need to declare

final vpnCheck = VPNCheck();

vpnCheck.vpnState.listen((state) {
if (state == VPNState.CONNECTED) {
if (kDebugMode) {
print("VPN connected.");
}
} else {
if (kDebugMode) {
print("VPN disconnected.");
}
}
});

copied to clipboard
Checks if new version available
For checking app new version device must need to connected with the internet.
For android need to declare
appVersionStatus(){

final newVersion = NewVersionChecker(
iOSId: '',
androidId: '',
);

statusCheck(newVersion);
}

statusCheck(NewVersionChecker newVersion) async {
try {
final status = await newVersion.getVersionStatus();

if (status != null) {
debugPrint(status.appStoreLink);
debugPrint(status.localVersion);
debugPrint(status.storeVersion);
debugPrint(status.canUpdate.toString());

if (status.canUpdate) {
// new version available
}
}
} catch (e) {
if (kDebugMode) {
print(e.toString());
}
}
}
copied to clipboard

License

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

Customer Reviews

There are no reviews.