VideoPlayer constructor

const VideoPlayer(
  1. String url, {
  2. required double aspectRatio,
  3. bool autoResize = true,
  4. bool autoplay = false,
  5. bool controls = false,
  6. Widget errorBuilder(
    1. BuildContext context,
    2. String url,
    3. dynamic error
    )?,
  7. Key? key,
  8. Widget loadingBuilder(
    1. BuildContext context,
    2. String url,
    3. Widget child
    )?,
  9. bool loop = false,
  10. Widget? poster,
})

Creates a player.

Implementation

const VideoPlayer(
  this.url, {
  required this.aspectRatio,
  this.autoResize = true,
  this.autoplay = false,
  this.controls = false,
  this.errorBuilder,
  super.key,
  this.loadingBuilder,
  this.loop = false,
  this.poster,
});