Video constructor

Video({
  1. required String src,
  2. int? width,
  3. int? height,
  4. bool autoplay = false,
  5. bool controls = false,
  6. Set<VideoControl>? controlsList,
  7. bool disablePictureInPicture = false,
  8. bool disableRemotePlayback = false,
  9. bool loop = false,
  10. bool muted = false,
  11. bool playsInline = false,
  12. bool tabFocusable = true,
  13. String? id,
  14. Iterable<String>? classes,
  15. Iterable<String>? inlineStyles,
})

Implementation

Video({
  required this.src,
  this.width,
  this.height,
  this.autoplay = false,
  this.controls = false,
  this.controlsList,
  this.disablePictureInPicture = false,
  this.disableRemotePlayback = false,
  this.loop = false,
  this.muted = false,
  this.playsInline = false,
  this.tabFocusable = true,
  super.id,
  super.classes,
  super.inlineStyles,
}) : super(children: []) {
  if (autoplay && !muted) {
    throw Exception("Video cannot be autoplay if it isn't muted!");
  }
  if (controlsList != null && !controls) {
    throw Exception("ControlsList is defined, but controls is disabled!");
  }
}