Video constructor
Video({ - required String src,
- int? width,
- int? height,
- bool autoplay = false,
- bool controls = false,
- Set<VideoControl>? controlsList,
- bool disablePictureInPicture = false,
- bool disableRemotePlayback = false,
- bool loop = false,
- bool muted = false,
- bool playsInline = false,
- bool tabFocusable = true,
- String? id,
- Iterable<String>? classes,
- 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!");
}
}