decodeResponse static method

MailboxOperationResponse decodeResponse(
  1. Uint8List bytes
)

Decode response from JSON bytes

Implementation

static MailboxOperationResponse decodeResponse(Uint8List bytes) {
  try {
    final json = utf8.decode(bytes);
    final data = jsonDecode(json) as Map<String, dynamic>;
    return MailboxOperationResponse.fromJson(data);
  } catch (e) {
    throw FormatException('Failed to decode mailbox management response: $e');
  }
}