onModelError property

void Function(Object error, String modelPath, YOLOTask? task)? onModelError
final

Called when an in-place model switch fails while a previously loaded model is still running natively. Carries the modelPath/task of the request that failed so the host can ignore stale failures and only react to the request that matches its current selection. Lets the host clear transient UI without the view tearing itself down into a full-screen error.

Implementation

final void Function(Object error, String modelPath, YOLOTask? task)?
onModelError;