getCameraPermissions static method

Future<bool> getCameraPermissions()

This method is used to get camera permissions

Implementation

static Future<bool> getCameraPermissions() async {
  if (Platform.isIOS) return true;
  await Permission.camera.request();

  while ((await Permission.camera.isDenied)) {
    await Permission.camera.request();
  }

  return true;
}