GNFileUploadWidget constructor

GNFileUploadWidget({
  1. Key? key,
  2. int? maxSizeInMB,
  3. required void onFileSelected(
    1. File? file,
    2. bool? isValidFile
    )?,
  4. bool isRequired = true,
  5. required bool isFileUploaded,
  6. List<String>? allowedFileExtensions,
  7. String? fileNameWhileEdit,
  8. bool isPhotoUpload = false,
  9. void onFileRemove()?,
  10. bool? showImageOnTap = true,
  11. bool? isClearFile = false,
  12. bool? isOnlyGalleryUpload = false,
  13. bool? isOnlyDocumentUpload = false,
  14. bool? isOnlyPhotoUpload = false,
  15. bool? isImageCompress = false,
  16. double? maxImageCompressSizeInMB = 2,
  17. String? uploadDocumentTitle,
  18. IconData? uploadDocumentIcon,
  19. Color? uploadDocumentIconColor,
  20. double? uploadDocumentIconSize,
  21. 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);