GSField.imagePicker constructor

GSField.imagePicker({
  1. Key? key,
  2. required String tag,
  3. required Widget iconWidget,
  4. String? defaultImagePathValue,
  5. String? title,
  6. String? errorMessage,
  7. String? helpMessage,
  8. bool? required,
  9. bool? showTitle,
  10. GSFieldStatusEnum? status,
  11. int? weight,
  12. String? hint,
  13. String? cameraPopupTitle,
  14. String? galleryPopupTitle,
  15. String? cameraPopupIcon,
  16. String? galleryPopupIcon,
  17. GSImageSource? imageSource,
  18. Color? iconColor,
  19. bool? showCropper,
  20. double? maximumSizePerImageInBytes,
  21. VoidCallback? onErrorSizeItem,
})

Implementation

GSField.imagePicker({
  Key? key,
  required String tag,
  required Widget iconWidget,
  String? defaultImagePathValue,
  String? title,
  String? errorMessage,
  String? helpMessage,
  bool? required,
  bool? showTitle,
  GSFieldStatusEnum? status,
  int? weight,
  String? hint,
  String? cameraPopupTitle,
  String? galleryPopupTitle,
  String? cameraPopupIcon,
  String? galleryPopupIcon,
  GSImageSource? imageSource,
  Color? iconColor,
  bool? showCropper,
  double? maximumSizePerImageInBytes,
  VoidCallback? onErrorSizeItem,
}) : super(key: key) {
  model = GSImagePickerModel(
    type: GSFieldTypeEnum.imagePicker,
    tag: tag,
    showCropper: showCropper ?? true,
    imageSource: imageSource ?? GSImageSource.both,
    showTitle: showTitle ?? false,
    title: title,
    cameraPopupTitle: cameraPopupTitle,
    galleryPopupTitle: galleryPopupTitle,
    cameraPopupIcon: cameraPopupIcon,
    galleryPopupIcon: galleryPopupIcon,
    errorMessage: errorMessage,
    helpMessage: helpMessage,
    required: required,
    status: status,
    weight: weight,
    hint: hint,
    iconWidget: iconWidget,
    value: defaultImagePathValue,
    maximumSizePerImageInBytes: maximumSizePerImageInBytes,
    onErrorSizeItem: onErrorSizeItem,
  );
}