startImageStream method
Implementation
Future<void> startImageStream({UFrameFormat? format, double? maxFps, int? downscale}) async {
final int? id = _sessionId;
if (id == null || value.isStreamingFrames) return;
_frames ??= UCameraChannel.frames(id).listen(_onFrame, onError: _onStreamError);
await _set("startImageStream", <String, Object?>{
"format": (format ?? _config.frameFormat).name,
"maxFps": maxFps ?? _config.frameMaxFps,
"downscale": downscale ?? _config.frameDownscale,
});
_emit(value.copyWith(isStreamingFrames: true));
}