searchOptional method
Implementation
StructureModel? searchOptional(
Iterable<StructureModel> items, String compareTo) {
final response = items.optionalSingle<StructureModel>(
(element) => element.folder == compareTo,
);
if (response == null) {
throw FlowException(
'La carpeta $compareTo no existe dentro de la estructura del modelo',
);
}
return response;
}