openCamera method

Future<HLPickerItem> openCamera({
  1. HLCameraOptions? cameraOptions,
  2. bool? cropping,
  3. HLCropOptions? cropOptions,
  4. LocalizedImageCropper? localized,
})

Take a photo or record a video

cameraOptions: Additional options for the camera functionality: cameraType, recordVideoMaxSecond, isExportThumbnail...

cropping: Indicating whether or not cropping is enabled

cropOptions: Configuration options for the cropping functionality: aspectRatio, aspectRatioPresets, compressQuality, compressFormat

localized: Custom text displayed for the plugin

Returns a HLPickerItem object

Implementation

Future<HLPickerItem> openCamera({
  HLCameraOptions? cameraOptions,
  bool? cropping,
  HLCropOptions? cropOptions,
  LocalizedImageCropper? localized,
}) async {
  return platform.openCamera(
    cameraOptions: cameraOptions,
    cropping: cropping,
    cropOptions: cropOptions,
    localized: localized,
  );
}