requestPermissions method

  1. @override
Future<String?> requestPermissions([
  1. dynamic background
])
override

The function requestPermissions in Dart is used to request permissions and returns a Future that resolves to a String. @param background - The background parameter is an optional boolean parameter that indicates whether the permissions should be requested in the background or not. If background is not provided, it defaults to false. @returns The method is returning a Future object that resolves to a String or null.

Implementation

@override
Future<String?> requestPermissions([background]) async {
  background ??= false;
  final returnVal = await methodChannel.invokeMethod<String>(
      'requestPermissions', background);
  return returnVal;
}