BloomCamera class

Camera capture and photo gallery interface for Bloom applications wrapping image_picker.

Automatically handles native camera permissions verification via BloomPermissions before launching native capture interfaces.

Example:

final camera = BloomCamera();
final authorized = await camera.initialize();
if (authorized) {
  final photo = await camera.takePicture(
    preferredCamera: CameraDevice.rear,
    imageQuality: 85,
  );
}

Constructors

BloomCamera([ImagePicker? picker])
Creates a BloomCamera interface with an optional custom picker instance for testing.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

initialize() Future<bool>
Initializes and verifies camera hardware access permissions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickFromGallery({double? maxWidth, double? maxHeight, int? imageQuality}) Future<BloomCapturedPhoto?>
Selects a photo from the device photo gallery.
takePicture({CameraDevice preferredCamera = CameraDevice.rear, double? maxWidth, double? maxHeight, int? imageQuality}) Future<BloomCapturedPhoto?>
Captures a photo using the native OS camera interface.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited