ImagePickerWidget constructor
const
ImagePickerWidget({
- Key? key,
- required double diameter,
- dynamic initialImage,
- bool isEditable = false,
- bool shouldCrop = false,
- void onChange()?,
- Color? backgroundColor,
- Radius borderRadius = const Radius.circular(8),
- ImagePickerWidgetShape shape = ImagePickerWidgetShape.circle,
- AlignmentGeometry? iconAlignment,
- Widget? editIcon,
- BoxFit? fit,
- IndexedWidgetPickerBuilder? imagePickerModal,
- ModalOptions? modalOptions,
- CroppedImageOptions? croppedImageOptions,
- 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);