CupertinoControls constructor
CupertinoControls({
- Key? key,
- Duration hideDuration = const Duration(seconds: 4),
- Color backgroundColor = const Color(0x90000000),
- Color color = const Color(0xFFFFFFFF),
- IconData subtitleON = Icons.closed_caption,
- IconData subtitleOFF = Icons.closed_caption_off_outlined,
- IconData speed = Icons.speed,
- IconData fullscreenON = CupertinoIcons.arrow_up_left_arrow_down_right,
- IconData fullscreenOFF = CupertinoIcons.arrow_down_right_arrow_up_left,
- IconData volumeON = Icons.volume_up,
- IconData volumeOFF = Icons.volume_off,
- IconData error = Icons.error,
- IconData skipForward = CupertinoIcons.gobackward_15,
- IconData skipBack = CupertinoIcons.gobackward_15,
- bool enableSubtitle = true,
- bool enableSpeed = true,
- bool enableSkip = true,
- bool enableFullscreen = true,
- bool enableVolume = true,
- bool enablePlay = true,
- bool enablePosition = true,
- bool enableRemaining = true,
- PositionBuilder? positionBuilder,
- RemainingBuilder? remainingBuilder,
- FlVideoPlayerProgressColors progressColors = const FlVideoPlayerProgressColors(played: Color(0x78ffffff), handle: Color(0xffffffff), buffered: Color(0x3cffffff), background: Color(0x14ffffff)),
- 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),
- FlVideoControlsErrorBuilder? errorBuilder,
- FlVideoControlsTap? onTap,
- FlVideoControlsProgressDrag? onDragProgress,
- bool enableBottomBar = true,
Implementation
CupertinoControls({
super.key,
this.hideDuration = const Duration(seconds: 4),
this.backgroundColor = const Color(0x90000000),
this.color = const Color(0xFFFFFFFF),
this.subtitleON = Icons.closed_caption,
this.subtitleOFF = Icons.closed_caption_off_outlined,
this.speed = Icons.speed,
this.fullscreenON = CupertinoIcons.arrow_up_left_arrow_down_right,
this.fullscreenOFF = CupertinoIcons.arrow_down_right_arrow_up_left,
this.volumeON = Icons.volume_up,
this.volumeOFF = Icons.volume_off,
this.error = Icons.error,
this.skipForward = CupertinoIcons.gobackward_15,
this.skipBack = CupertinoIcons.gobackward_15,
this.enableSubtitle = true,
this.enableSpeed = true,
this.enableSkip = true,
this.enableFullscreen = true,
this.enableVolume = true,
this.enablePlay = true,
this.enablePosition = true,
this.enableRemaining = true,
this.positionBuilder,
this.remainingBuilder,
this.progressColors = const FlVideoPlayerProgressColors(
played: Color(0x78ffffff),
handle: Color(0xffffffff),
buffered: Color(0x3cffffff),
background: Color(0x14ffffff)),
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.errorBuilder,
this.onTap,
this.onDragProgress,
this.enableBottomBar = true,
}) : assert(playbackSpeeds.every((speed) => speed > 0),
'The playbackSpeeds values must all be greater than 0');