VideoPackage constructor

VideoPackage(
  1. Attachment _attachment, {
  2. bool showControls = false,
  3. bool autoInitialize = true,
})

Constructor for creating VideoPackage

Implementation

VideoPackage(
  this._attachment, {
  bool showControls = false,
  bool autoInitialize = true,
})  : _showControls = showControls,
      _autoInitialize = autoInitialize,
      _videoPlayerController = _attachment.localUri != null
          ? VideoPlayerController.file(
              File.fromUri(_attachment.localUri!),
            )
          : VideoPlayerController.networkUrl(
              Uri.parse(_attachment.assetUrl!),
            );