isPosError function

bool isPosError(
  1. Object? error, [
  2. String? code
])

Kurzform für catch (e) { if (isPosError(e, 'logo_too_large')) … }.

Implementation

bool isPosError(Object? error, [String? code]) {
  final gefunden = posErrorCode(error);
  return gefunden != null && (code == null || gefunden == code);
}