ImagePickerAndCropperRepository class
A repository that combines image picking and cropping into a single API.
Wraps ImagePicker and ImageCropper with configurable settings supplied at construction time via PickImageSettings and CropperSettings.
Optional picker and cropper parameters allow injecting test doubles;
production code omits them and receives default instances.
Constructors
- ImagePickerAndCropperRepository({required PickImageSettings pickImageSettings, required CropperSettings cropperSettings, ImagePicker? picker, ImageCropper? cropper})
- Creates an ImagePickerAndCropperRepository.
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
-
cropImage(
File file) → Future< File?> -
Crops
file. Returnsnullif the user cancels. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pickAndCropImage(
ImageSource source) → Future< File?> -
Picks and then crops an image from
source. Returnsnullif the user cancels either step. -
pickImage(
ImageSource source) → Future< File?> -
Picks an image from
source. Returnsnullif the user cancels. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited