EzVideoPlayer constructor

const EzVideoPlayer({
  1. Key? key,
  2. required VideoPlayerController controller,
  3. required String semantics,
  4. required Color iconColor,
  5. double hiddenOpacity = 0.0,
  6. Decoration controlsBackground = const BoxDecoration(color: Colors.transparent),
  7. MainAxisAlignment controlsAlignment = MainAxisAlignment.center,
  8. ButtonVis playVis = ButtonVis.auto,
  9. ButtonVis volumeVis = ButtonVis.auto,
  10. bool variableVolume = true,
  11. ButtonVis replayVis = ButtonVis.auto,
  12. ButtonVis sliderVis = ButtonVis.auto,
  13. bool showOnPause = false,
  14. bool autoPlay = true,
  15. bool autoLoop = false,
  16. double startingVolume = 0.0,
  17. double maxWidth = double.infinity,
  18. double maxHeight = double.infinity,
})

Stacks play, mute, and replay buttons on top of an AspectRatio for the controller Also supports tap-to-pause on the main window via MouseRegion The visibility of each button can be controlled with ButtonVis Optionally provide a BoxDecoration background for the controls region The video will begin muted unless startingVolume is specified Optionally provide maxWidth and maxHeight to shape the video

Implementation

const EzVideoPlayer({
  Key? key,
  required this.controller,
  required this.semantics,
  required this.iconColor,
  this.hiddenOpacity = 0.0,
  this.controlsBackground = const BoxDecoration(color: Colors.transparent),
  this.controlsAlignment = MainAxisAlignment.center,
  this.playVis = ButtonVis.auto,
  this.volumeVis = ButtonVis.auto,
  this.variableVolume = true,
  this.replayVis = ButtonVis.auto,
  this.sliderVis = ButtonVis.auto,
  this.showOnPause = false,
  this.autoPlay = true,
  this.autoLoop = false,
  this.startingVolume = 0.0,
  this.maxWidth = double.infinity,
  this.maxHeight = double.infinity,
}) : super(key: key);