BatteryLevel property

Future<String> BatteryLevel

Implementation

static Future<String> get BatteryLevel async{
  String batteryLevel;
  try{
    final int result = await _channel.invokeMethod('getBarreryLevel');
    batteryLevel = 'Battery level at $result % .';
  }on PlatformException catch(e){
    batteryLevel = "Failed to get battery level:'${e.message}";
  }
  return batteryLevel;
}