SingleImagePicker constructor

SingleImagePicker({
  1. Key? key,
  2. required Widget child(
    1. BuildContext context,
    2. Function upload
    )?,
  3. dynamic defaultImage,
  4. Function? onError,
  5. double height = 70,
  6. double width = 70,
  7. Widget? loading,
  8. ApiRequest? apiUploadImage,
  9. required dynamic setImageUrlFromResponse(
    1. dynamic response
    ),
  10. int? imageQuality = 80,
  11. String imageSource = "gallery",
  12. String cameraDevice = "rear",
  13. bool canUpdate = true,
  14. BorderRadius? borderRadius,
  15. double? maxSize,
  16. List<String>? allowedMimeTypes,
})

Implementation

SingleImagePicker(
    {super.key,
    required this.child,
    this.defaultImage,
    this.onError,
    this.height = 70,
    this.width = 70,
    this.loading,
    this.apiUploadImage,
    required this.setImageUrlFromResponse,
    this.imageQuality = 80,
    this.imageSource = "gallery", // camera, gallery
    this.cameraDevice = "rear", // rear, front
    this.canUpdate = true,
    this.borderRadius,
    this.maxSize,
    this.allowedMimeTypes})
    : style = "default";