GridVideoPicker constructor
GridVideoPicker({
- Key? key,
- required dynamic defaultVideos(),
- required String? setVideoUrlFromItem(
- dynamic item
- String? setVideoThumbnailFromItem(
- dynamic item
- ApiRequest? apiUpload,
- ApiRequest apiDelete(
- dynamic item
- bool canDeleteVideo(
- dynamic item
- int maxVideos = 10,
- double maxSize = 50 * 1024 * 1024,
- List<
String> ? allowedMimeTypes, - UploadMode uploadMode = UploadMode.standard,
- String itemIdResolver(
- dynamic item
- dynamic onVideoUploaded(
- dynamic response
- dynamic onDeleteVideoResponse(
- dynamic response
- Future onUploadVideos(
- List<
PickedFileInfo> videos
- List<
- double height = 100,
- double width = 100,
- Widget? loading,
- Widget placeholder = const SizedBox.shrink(),
- 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");
}