requestPermission method

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

Implementation

@override
Future<int> requestPermission() async {
  try {
    final result = await methodChannel.invokeMethod<int>('requestPermission');
    return result ?? 0;
  } on Exception catch (e) {
    if (kDebugMode) {
      print(e.toString());
    }
  }
  return -1;
}