CachedVideoPlayerController.asset constructor

CachedVideoPlayerController.asset(
  1. String dataSource, {
  2. String? package,
  3. Future<ClosedCaptionFile>? closedCaptionFile,
  4. VideoPlayerOptions? videoPlayerOptions,
})

Constructs a CachedVideoPlayerController playing a video from an asset.

The name of the asset is given by the dataSource argument and must not be null. The package argument must be non-null when the asset comes from a package and null otherwise.

Implementation

CachedVideoPlayerController.asset(this.dataSource,
    {this.package, this.closedCaptionFile, this.videoPlayerOptions})
    : dataSourceType = DataSourceType.asset,
      formatHint = null,
      httpHeaders = const {},
      super(CachedVideoPlayerValue(duration: Duration.zero));