errorCodeFrom function

String? errorCodeFrom(
  1. Map envelope
)

Der code einer Antworthuelle — nur ein nicht leerer Text zaehlt, alles andere waere ein geratener Vertrag.

Implementation

String? errorCodeFrom(Map<dynamic, dynamic> envelope) {
  final code = envelope['code'];
  return code is String && code.isNotEmpty ? code : null;
}