battery method

  1. @override
Future<int> battery()
override

Implementation

@override
Future<int> battery() async {
  if (Platform.isIOS) {
    throw UnimplementedError();
  }
  int battery = await _channel.invokeMethod<int>('battery') ?? -1;
  return battery;
}