getCameraPermissionStatus method

  1. @override
Future<bool> getCameraPermissionStatus()
override

Implementation

@override
Future<bool> getCameraPermissionStatus() async {
  try {
    final ok = await methodChannel.invokeMethod<bool>(
      'getCameraPermissionStatus',
    );
    return ok ?? false;
  } on PlatformException catch (e) {
    throw CameraPermissionException(
      code: e.code,
      message: e.message ?? 'Unknown permission status error',
      details: e.details is Map<Object?, Object?>
          ? Map<String, dynamic>.from(e.details as Map<Object?, Object?>)
          : null,
    );
  }
}