root_checker_plus

Last updated:

0 purchases

root_checker_plus Image
root_checker_plus Images
Add to Cart

Description:

root checker plus

root_checker_plus #
Plugin used for detecting root device in android and jailbreak detection ios.
It uses RootBeer on Android,
and DTTJailbreakDetection on iOS.
Getting Started #
With a placeholder:

import 'package:root_checker_plus/root_checker_plus.dart';

copied to clipboard
initState #
With a placeholder:
if (Platform.isAndroid) {
androidRootChecker();
developerMode();
}
if (Platform.isIOS) {
iosJailbreak();
}

copied to clipboard
implemented Method #
With a placeholder:
Future<void> androidRootChecker() async {
try {
rootedCheck = (await RootCheckerPlus.isRootChecker())!;
} on PlatformException {
rootedCheck = false;
}
if (!mounted) return;
setState(() {
rootedCheck = rootedCheck;
});
}

Future<void> developerMode() async {
try {
devMode = (await RootCheckerPlus.isDeveloperMode())!;
} on PlatformException {
devMode = false;
}
if (!mounted) return;
setState(() {
devMode = devMode;
});
}

Future<void> iosJailbreak() async {
try {
jailbreak = (await RootCheckerPlus.isJailbreak())!;
} on PlatformException {
jailbreak = false;
}
if (!mounted) return;
setState(() {
jailbreak = jailbreak;
});
}

copied to clipboard
Ouput widgets #
With a placeholder:
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Root checker example app'),
),
body: Center(
child: Platform.isAndroid
? Text('Running on Android\n\n Root Checker: $rootedCheck\n Developer Mode Enable:$devMode')
: Text('Running on iOS\n Jailbreak: $jailbreak \n')),
),
);
}

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.