CupertinoControls constructor

CupertinoControls({
  1. Key? key,
  2. Duration hideDuration = const Duration(seconds: 4),
  3. Color backgroundColor = const Color(0x90000000),
  4. Color color = const Color(0xFFFFFFFF),
  5. IconData subtitleON = Icons.closed_caption,
  6. IconData subtitleOFF = Icons.closed_caption_off_outlined,
  7. IconData speed = Icons.speed,
  8. IconData fullscreenON = CupertinoIcons.arrow_up_left_arrow_down_right,
  9. IconData fullscreenOFF = CupertinoIcons.arrow_down_right_arrow_up_left,
  10. IconData volumeON = Icons.volume_up,
  11. IconData volumeOFF = Icons.volume_off,
  12. IconData error = Icons.error,
  13. IconData skipForward = CupertinoIcons.gobackward_15,
  14. IconData skipBack = CupertinoIcons.gobackward_15,
  15. bool enableSubtitle = true,
  16. bool enableSpeed = true,
  17. bool enableSkip = true,
  18. bool enableFullscreen = true,
  19. bool enableVolume = true,
  20. bool enablePlay = true,
  21. bool enablePosition = true,
  22. bool enableRemaining = true,
  23. PositionBuilder? positionBuilder,
  24. RemainingBuilder? remainingBuilder,
  25. FlVideoPlayerProgressColors progressColors = const FlVideoPlayerProgressColors(played: Color(0x78ffffff), handle: Color(0xffffffff), buffered: Color(0x3cffffff), background: Color(0x14ffffff)),
  26. List<double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
  27. Widget loading = const CircularProgressIndicator(color: Colors.white),
  28. FlVideoControlsErrorBuilder? errorBuilder,
  29. FlVideoControlsTap? onTap,
  30. FlVideoControlsProgressDrag? onDragProgress,
  31. 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');