decodeMessage static method
Decode an SFMessage from submission frame
Implementation
static SFMessage decodeMessage(Uint8List frameBytes) {
try {
final json = utf8.decode(frameBytes);
final data = jsonDecode(json) as Map<String, dynamic>;
return SFMessage.fromJson(data);
} catch (e) {
throw FormatException('Failed to decode submission frame: $e');
}
}