MyMiniVideoPlayer constructor

const MyMiniVideoPlayer({
  1. Key? key,
  2. required String videoSource,
  3. bool isAsset = false,
  4. Map<String, String>? qualitySources,
  5. List<double>? speedOptions,
  6. Color? containerColor = Colors.black,
  7. double? containerCircularRadius = 12,
  8. List<BoxShadow>? containerBoxShadow,
  9. EdgeInsetsGeometry? containerPadding = const EdgeInsets.all(0),
  10. EdgeInsetsGeometry? containerMargin = const EdgeInsets.all(8),
  11. double? containerHeight,
  12. double? containerWidth,
  13. BoxShape? containerShape,
  14. double? aspectRatio,
  15. Color? playPauseIconColor = Colors.white,
  16. Color? sliderActiveColor = Colors.red,
  17. Color? sliderInactiveColor = Colors.grey,
  18. Color? sliderThumbColor = Colors.red,
  19. TextStyle? timerTextStyle = const TextStyle(fontSize: 12, color: Colors.white),
  20. Duration? animationDuration = const Duration(milliseconds: 300),
  21. Duration autoHideDuration = const Duration(seconds: 3),
  22. bool showPlayPause = true,
  23. bool showSlider = true,
  24. bool showTimer = true,
  25. bool showFullScreenButton = true,
  26. bool showSettingsButton = false,
  27. bool isFullScreen = false,
  28. VideoPlayerController? externalController,
  29. bool disposeController = true,
})

Implementation

const MyMiniVideoPlayer({
  super.key,
  required this.videoSource,
  this.isAsset = false,
  this.qualitySources,
  this.speedOptions,
  // Container styling defaults:
  this.containerColor = Colors.black,
  this.containerCircularRadius = 12,
  this.containerBoxShadow,
  this.containerPadding = const EdgeInsets.all(0),
  this.containerMargin = const EdgeInsets.all(8),
  this.containerHeight,
  this.containerWidth,
  this.containerShape,
  this.aspectRatio,
  // Control styling defaults:
  this.playPauseIconColor = Colors.white,
  this.sliderActiveColor = Colors.red,
  this.sliderInactiveColor = Colors.grey,
  this.sliderThumbColor = Colors.red,
  this.timerTextStyle = const TextStyle(fontSize: 12, color: Colors.white),
  this.animationDuration = const Duration(milliseconds: 300),
  // Control behavior and visibility defaults:
  this.autoHideDuration = const Duration(seconds: 3),
  this.showPlayPause = true,
  this.showSlider = true,
  this.showTimer = true,
  this.showFullScreenButton = true,
  this.showSettingsButton = false,
  this.isFullScreen = false,
  // External controller:
  this.externalController,
  this.disposeController = true,
});