rebootDevice static method
Reboot device
Implementation
static Future<bool?> rebootDevice() async {
if (Platform.isAndroid) {
try {
return await _channel.invokeMethod(_METHOD_REBOOT_DEVICE);
} on PlatformException catch (e) {
throw "Reboot Device Error Occurred: Code: ${e.code}. Message: ${e.message}. Details: ${e.details}";
}
} else {
// Return false if not Android.
return false;
}
}