GNFileUploadWidget constructor
GNFileUploadWidget({
- Key? key,
- int? maxSizeInMB,
- required void onFileSelected()?,
- bool isRequired = true,
- required bool isFileUploaded,
- List<
String> ? allowedFileExtensions, - String? fileNameWhileEdit,
- bool isPhotoUpload = false,
- void onFileRemove()?,
- bool? showImageOnTap = true,
- bool? isClearFile = false,
- bool? isOnlyGalleryUpload = false,
- bool? isOnlyDocumentUpload = false,
- bool? isOnlyPhotoUpload = false,
- bool? isImageCompress = false,
- double? maxImageCompressSizeInMB = 2,
- String? uploadDocumentTitle,
- IconData? uploadDocumentIcon,
- Color? uploadDocumentIconColor,
- double? uploadDocumentIconSize,
- bool? isShowCancelIcon = true,
Implementation
GNFileUploadWidget({
Key? key,
this.maxSizeInMB,
required this.onFileSelected,
this.isRequired = true,
required this.isFileUploaded,
this.allowedFileExtensions,
this.fileNameWhileEdit,
this.isPhotoUpload = false,
this.onFileRemove,
this.showImageOnTap = true,
this.isClearFile = false,
this.isOnlyGalleryUpload = false,
this.isOnlyDocumentUpload = false,
this.isOnlyPhotoUpload = false,
this.isImageCompress = false,
this.maxImageCompressSizeInMB = 2,
this.uploadDocumentTitle,
this.uploadDocumentIcon,
this.uploadDocumentIconColor,
this.uploadDocumentIconSize,
this.isShowCancelIcon = true,
// this.isSizeLimit = true,
}) : super(key: key);