isDeviceRooted static method

Future<bool> isDeviceRooted()

Implementation

static Future<bool> isDeviceRooted() async {
  if (!Platform.isAndroid) {
    return false;
  }

  try {
    final bool result = await platform.invokeMethod('isDeviceRooted');
    return result;
  } on PlatformException catch (e) {
    print("Failed to check root status: ${e.message}");
    return false;
  }
}