decodeResponse static method
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');
}
}