requestPermissions function

void requestPermissions()

Implementation

void requestPermissions() async {
  Map<Permission, PermissionStatus> status =
      await [Permission.camera, Permission.storage, Permission.locationWhenInUse].request();

  if (status[Permission.camera]!.isDenied) {
    print("camera permission denied");
  }

  if (status[Permission.storage]!.isDenied) {
    print("storage permission denied");
  }

  if (status[Permission.locationWhenInUse]!.isDenied) {
    print("storage permission denied");
  }
}