Callback when a new frame is available for rendering
void Function(ui.Image frame)? onFrameAvailable;