ScrollThumbnailWidget constructor

const ScrollThumbnailWidget({
  1. Key? key,
  2. required File videoFile,
  3. required int videoDuration,
  4. required double thumbnailHeight,
  5. required int numberOfThumbnails,
  6. required BoxFit fit,
  7. required ScrollController scrollController,
  8. required VoidCallback onThumbnailLoadingComplete,
  9. int quality = 75,
})

Creates a ScrollableThumbnailViewer widget.

  • videoFile is the video file from which thumbnails are generated.
  • videoDuration is the total duration of the video in milliseconds.
  • thumbnailHeight is the height of each thumbnail.
  • numberOfThumbnails is the number of thumbnails to generate.
  • fit is how the thumbnails should be inscribed into the allocated space.
  • scrollController is the scroll controller for the scrollable thumbnail view.
  • onThumbnailLoadingComplete is the callback function that is called when thumbnail loading is complete.
  • quality is the quality of the generated thumbnails, ranging from 0 to 100. Defaults to 75.

Implementation

const ScrollThumbnailWidget({
  super.key,
  required this.videoFile,
  required this.videoDuration,
  required this.thumbnailHeight,
  required this.numberOfThumbnails,
  required this.fit,
  required this.scrollController,
  required this.onThumbnailLoadingComplete,
  this.quality = 75,
});