isInventoryError function
Kurzform fuer on Object catch (e) { if (isInventoryError(e, 'article_not_found')) … };
ohne code jeder Code der Lager-API.
Implementation
bool isInventoryError(Object? error, [String? code]) {
final gefunden = inventoryErrorCode(error);
return gefunden != null && (code == null || gefunden == code);
}