hasPermission static method

Future<bool> hasPermission(
  1. Permission permission
)

Implementation

static Future<bool> hasPermission(Permission permission) async{
  final status = await permission.status;
  return status.isGranted;
}