requestPermission static method

Future<bool> requestPermission(
  1. Permission permission
)

Implementation

static Future<bool> requestPermission(Permission permission) async{
  return await permission.request().isGranted;
}