getStatus method

  1. @override
Future<Status> getStatus()
override

Implementation

@override
Future<Status> getStatus() async {
  final status = await methodChannel.invokeMethod<int>('getStatus');

  if (status == null) {
    throw PlatformException(
        code: 'getStatus', message: 'Could not retrieve background status');
  }

  return Status.values[status];
}