ImagePickerWidget constructor

const ImagePickerWidget({
  1. Key? key,
  2. required double diameter,
  3. dynamic initialImage,
  4. bool isEditable = false,
  5. bool shouldCrop = false,
  6. void onChange(
    1. File
    )?,
  7. Color? backgroundColor,
  8. Radius borderRadius = const Radius.circular(8),
  9. ImagePickerWidgetShape shape = ImagePickerWidgetShape.circle,
  10. AlignmentGeometry? iconAlignment,
  11. Widget? editIcon,
  12. BoxFit? fit,
  13. IndexedWidgetPickerBuilder? imagePickerModal,
  14. ModalOptions? modalOptions,
  15. CroppedImageOptions? croppedImageOptions,
  16. ImagePickerOptions? imagePickerOptions,
})

Implementation

const ImagePickerWidget(
    {Key? key,
    required this.diameter,
    this.initialImage,
    this.isEditable = false,
    this.shouldCrop = false,
    this.onChange,
    this.backgroundColor,
    this.borderRadius = const Radius.circular(8),
    this.shape = ImagePickerWidgetShape.circle,
    this.iconAlignment,
    this.editIcon,
    this.fit,
    this.imagePickerModal,
    this.modalOptions,
    this.croppedImageOptions,
    this.imagePickerOptions
  }) : assert(
          (initialImage is String ||
              initialImage is File ||
              initialImage is ImageProvider ||
              initialImage == null),
          'initialImage must be an String, ImageProvider, or File'),
      super(key: key);