GridVideoPicker class

GridVideoPicker — multi-video grid picker. Uses file_picker with FileType.video for multi-pick. No camera support (picking multiple videos via camera doesn't fit the multi-select UX).

Uploads dispatch through MediaApiService.uploadVideos using the configured uploadMode (UploadMode.standard or UploadMode.sequential; UploadMode.gzip throws — gzip on encoded video is wasted CPU).

Inheritance

Constructors

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)?, double height = 100, double width = 100, Widget? loading, Widget placeholder = const SizedBox.shrink(), String deleteConfirmationTitle = "Delete video?"})

Properties

allowedMimeTypes → List<String>?
final
apiDelete → ApiRequest Function(dynamic item)?
final
apiUpload → ApiRequest?
final
canDeleteVideo → bool Function(dynamic item)?
final
defaultVideos → dynamic Function()
final
deleteConfirmationTitle → String
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
final
itemIdResolver → String Function(dynamic item)?
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loading → Widget?
final
maxSize → double
final
maxVideos → int
final
onDeleteVideoResponse → dynamic Function(dynamic response)?
final
onUploadVideos → Future Function(List<PickedFileInfo> videos)?
Bypass MediaApiService entirely — receives the picked videos and is responsible for uploading + returning a list of items to merge into the grid.
final
onVideoUploaded → dynamic Function(dynamic response)?
final
placeholder → Widget
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
setVideoThumbnailFromItem → String? Function(dynamic item)?
final
setVideoUrlFromItem → String? Function(dynamic item)
final
uploadMode → UploadMode
final
width → double
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

alwaysAllowDelete(dynamic _) → bool