GemCameraPlayerValue constructor

GemCameraPlayerValue({
  1. required DataSource dataSource,
  2. required GemCameraPlayerStatus status,
  3. Camera? camera,
  4. DataSourceListener? listener,
})

Creates a new immutable camera player value with the specified state.

Immutable container used by GemCameraPlayerController to represent the current playback state, latest frame, and optional internal listener. Use copyWith to produce modified instances rather than mutating this one.

Parameters

  • dataSource: The DataSource that supplies camera frames for this player.
  • status: The current GemCameraPlayerStatus indicating playback state.
  • camera: Optional latest Camera frame data; null if no frame has been received yet.
  • listener: Optional internal DataSourceListener registered on dataSource for updates. Stored for cleanup and should not be used directly.

Implementation

GemCameraPlayerValue({
  required this.dataSource,
  required this.status,
  this.camera,
  DataSourceListener? listener,
}) : _listener = listener;