GridVideoPicker constructor

GridVideoPicker({
  1. Key? key,
  2. required dynamic defaultVideos(),
  3. required String? setVideoUrlFromItem(
    1. dynamic item
    ),
  4. String? setVideoThumbnailFromItem(
    1. dynamic item
    )?,
  5. ApiRequest? apiUpload,
  6. ApiRequest apiDelete(
    1. dynamic item
    )?,
  7. bool canDeleteVideo(
    1. dynamic item
    )?,
  8. int maxVideos = 10,
  9. double maxSize = 50 * 1024 * 1024,
  10. List<String>? allowedMimeTypes,
  11. UploadMode uploadMode = UploadMode.standard,
  12. String itemIdResolver(
    1. dynamic item
    )?,
  13. dynamic onVideoUploaded(
    1. dynamic response
    )?,
  14. dynamic onDeleteVideoResponse(
    1. dynamic response
    )?,
  15. Future onUploadVideos(
    1. List<PickedFileInfo> videos
    )?,
  16. double height = 100,
  17. double width = 100,
  18. Widget? loading,
  19. Widget placeholder = const SizedBox.shrink(),
  20. String deleteConfirmationTitle = "Delete video?",
})

Implementation

GridVideoPicker(
    {super.key,
    required this.defaultVideos,
    required this.setVideoUrlFromItem,
    this.setVideoThumbnailFromItem,
    this.apiUpload,
    this.apiDelete,
    this.canDeleteVideo,
    this.maxVideos = 10,
    this.maxSize = 50 * 1024 * 1024,
    this.allowedMimeTypes,
    this.uploadMode = UploadMode.standard,
    this.itemIdResolver,
    this.onVideoUploaded,
    this.onDeleteVideoResponse,
    this.onUploadVideos,
    this.height = 100,
    this.width = 100,
    this.loading,
    this.placeholder = const SizedBox.shrink(),
    this.deleteConfirmationTitle = "Delete video?"}) {
  assert(maxVideos > 0, "maxVideos must be greater than 0");
  assert(maxSize > 0, "maxSize must be greater than 0");
}