UVideoPlayer constructor

const UVideoPlayer({
  1. Key? key,
  2. String? url,
  3. String? base64,
  4. Uint8List? bytes,
  5. String? filePath,
  6. String? assetPath,
  7. bool autoPlay = false,
  8. bool looping = false,
  9. bool muted = false,
  10. bool showControls = true,
  11. bool allowFullScreen = true,
  12. bool allowPlaybackSpeed = true,
  13. bool autoHideControls = true,
  14. double? aspectRatio,
  15. BoxFit fit = BoxFit.contain,
  16. Color? accentColor,
  17. Color backgroundColor = Colors.black,
  18. double borderRadius = 12,
  19. Widget? placeholder,
})

Implementation

const UVideoPlayer({
  super.key,
  this.url,
  this.base64,
  this.bytes,
  this.filePath,
  this.assetPath,
  this.autoPlay = false,
  this.looping = false,
  this.muted = false,
  this.showControls = true,
  this.allowFullScreen = true,
  this.allowPlaybackSpeed = true,
  this.autoHideControls = true,
  this.aspectRatio,
  this.fit = BoxFit.contain,
  this.accentColor,
  this.backgroundColor = Colors.black,
  this.borderRadius = 12,
  this.placeholder,
}) : assert(
       url != null || base64 != null || bytes != null || filePath != null || assetPath != null,
       "Provide one video source",
     );