switchModel method
Implementation
Future<void> switchModel(String modelPath, [YOLOTask? task]) async {
if (_methodChannel == null || _viewId == null) return;
final resolvedModel = await YOLOModelResolver.resolve(
modelPath: modelPath,
task: task,
);
await _invoke('setModel', {
'modelPath': resolvedModel.modelPath,
'task': resolvedModel.task.name,
});
}