getPowerState static method
Gets the current power state of the device.
Implementation
static Future<PowerState> getPowerState() async {
final result = await LocusChannels.methods.invokeMethod('getPowerState');
if (result is Map) {
return PowerState.fromMap(Map<String, dynamic>.from(result));
}
return PowerState.unknown;
}