PlayerComponent constructor

const PlayerComponent({
  1. Key? key,
  2. required String url,
  3. void onProgress(
    1. double positionSec
    )?,
  4. void onControllerReady(
    1. VideoPlayerController controller
    )?,
  5. VoidCallback? onFirstFrameReady,
  6. void onControllerDispose()?,
  7. Future<void> awaitBeforeControllerDispose(
    1. VideoPlayerController controller
    )?,
  8. void onControllerReleased(
    1. VideoPlayerController controller
    )?,
  9. bool isControllerDisposedExternally()?,
  10. bool isControllerDisposedExternallyForController(
    1. VideoPlayerController controller
    )?,
  11. VoidCallback? onSwapTap,
  12. VoidCallback? onEnded,
  13. void onError(
    1. String message
    )?,
  14. bool controlsEnabled = true,
  15. bool offlineMode = false,
  16. bool muted = false,
  17. bool showSkeletonCenterPlaceholder = true,
  18. VideoViewType? viewType,
})

Implementation

const PlayerComponent({
  super.key,
  required this.url,
  this.onProgress,
  this.onControllerReady,
  this.onFirstFrameReady,
  this.onControllerDispose,
  this.awaitBeforeControllerDispose,
  this.onControllerReleased,
  this.isControllerDisposedExternally,
  this.isControllerDisposedExternallyForController,
  this.onSwapTap,
  this.onEnded,
  this.onError,
  this.controlsEnabled = true,
  this.offlineMode = false,
  this.muted = false,
  this.showSkeletonCenterPlaceholder = true,
  this.viewType,
});