MaterialControls constructor
MaterialControls({
- Key? key,
- FlVideoPlayerProgressColors progressColors = const FlVideoPlayerProgressColors(played: Color(0x80FFFFFF), handle: Color(0xFFFFFFFF), buffered: Color(0x55FFFFFF), background: Color(0x35FFFFFF)),
- IconData subtitleON = Icons.closed_caption,
- IconData subtitleOFF = Icons.closed_caption_off_outlined,
- IconData speed = Icons.speed,
- IconData fullscreenON = Icons.fullscreen,
- IconData fullscreenOFF = Icons.fullscreen_exit,
- IconData volumeON = Icons.volume_up,
- IconData volumeOFF = Icons.volume_off,
- IconData error = Icons.error,
- Color backgroundColor = const Color(0x90000000),
- Color color = const Color(0xFFFFFFFF),
- Duration hideDuration = const Duration(seconds: 4),
- bool enableSubtitle = true,
- bool enableSpeed = true,
- bool enableFullscreen = true,
- bool enableVolume = true,
- bool enablePlay = true,
- bool enablePosition = true,
- bool enableBottomBar = true,
- bool isLive = false,
- List<
double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], - Widget loading = const CircularProgressIndicator(color: Colors.white),
- PositionAndAllBuilder? positionBuilder,
- FlVideoControlsErrorBuilder? errorBuilder,
- FlVideoControlsTap? onTap,
- FlVideoControlsProgressDrag? onDragProgress,
Implementation
MaterialControls({
super.key,
this.progressColors = const FlVideoPlayerProgressColors(
played: Color(0x80FFFFFF),
handle: Color(0xFFFFFFFF),
buffered: Color(0x55FFFFFF),
background: Color(0x35FFFFFF)),
this.subtitleON = Icons.closed_caption,
this.subtitleOFF = Icons.closed_caption_off_outlined,
this.speed = Icons.speed,
this.fullscreenON = Icons.fullscreen,
this.fullscreenOFF = Icons.fullscreen_exit,
this.volumeON = Icons.volume_up,
this.volumeOFF = Icons.volume_off,
this.error = Icons.error,
this.backgroundColor = const Color(0x90000000),
this.color = const Color(0xFFFFFFFF),
this.hideDuration = const Duration(seconds: 4),
this.enableSubtitle = true,
this.enableSpeed = true,
this.enableFullscreen = true,
this.enableVolume = true,
this.enablePlay = true,
this.enablePosition = true,
this.enableBottomBar = true,
this.isLive = false,
this.playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
this.loading = const CircularProgressIndicator(color: Colors.white),
this.positionBuilder,
this.errorBuilder,
this.onTap,
this.onDragProgress,
}) : assert(playbackSpeeds.every((speed) => speed > 0),
'The playbackSpeeds values must all be greater than 0');