VideoEvent constructor

VideoEvent({
  1. required VideoEventType eventType,
  2. Duration? duration,
  3. Duration position = Duration.zero,
  4. Size? size,
  5. double? bufferPercent = 0,
  6. double? bufferPosition = 0,
  7. PlayerState state = PlayerState.idle,
})

Creates an instance of VideoEvent.

The eventType argument is required.

Depending on the eventType, the duration, size.

Implementation

// in all of the other video player packages, fix this, and then update
// the other packages to use const.
// ignore: prefer_const_constructors_in_immutables
VideoEvent(
    {required this.eventType,
    this.duration,
    this.position = Duration.zero,
    this.size,
    this.bufferPercent = 0,
    this.bufferPosition = 0,
    this.state = PlayerState.idle});