updateImage method

Future<void> updateImage()

Grabs the new frame, renders it, and replaces the old frame.

Implementation

Future<void> updateImage() async {
	data = models.video.feeds[widget.name]!;
	if (data.details.status != CameraStatus.CAMERA_ENABLED) {
	setState(() => imageLoader.image = null);
	}
	setState(() {});
	if (!data.hasFrame() || imageLoader.isLoading) return;
	await imageLoader.load(data.frame);
	if (mounted) setState(() {});
}