GridImagePicker constructor
GridImagePicker({
- Key? key,
- required dynamic defaultImages(),
- required String? setImageUrlFromItem(
- dynamic item
- ApiRequest? apiUploadImage,
- ApiRequest apiMainImage(
- dynamic item
- ApiRequest apiDeleteImage(
- dynamic item
- double height = 70,
- double width = 70,
- Widget? loading,
- int? imageQuality = 80,
- bool canDeleteImage = true,
- bool canSetMainImage = true,
- int maxImages = 11,
- double maxSize = 1024 * 1024 * 7,
- List<
String> ? allowedMimeTypes, - bool? setMainImageFromItem(
- dynamic item
- dynamic onImageUploaded(
- dynamic response
- dynamic onMainImageResponse(
- dynamic response
- dynamic onDeleteImageResponse(
- dynamic response
Implementation
GridImagePicker(
{super.key,
required this.defaultImages,
required this.setImageUrlFromItem,
this.apiUploadImage,
this.apiMainImage,
this.apiDeleteImage,
this.height = 70,
this.width = 70,
this.loading,
this.imageQuality = 80,
this.canDeleteImage = true,
this.canSetMainImage = true,
this.maxImages = 11,
this.maxSize = 1024 * 1024 * 7, // 7MB
this.allowedMimeTypes,
this.setMainImageFromItem,
this.onImageUploaded,
this.onMainImageResponse,
this.onDeleteImageResponse})
: style = "default" {
assert(maxImages > 0, "maxImages must be greater than 0");
assert(maxSize > 0, "maxSize must be greater than 0");
}