decode method

  1. @override
Future<WalletSendCalls> decode(
  1. EncodedContent encodedContent
)
override

Implementation

@override
Future<WalletSendCalls> decode(EncodedContent encodedContent) async {
  final jsonString = utf8.decode(encodedContent.content);
  final decoded = jsonDecode(jsonString);
  if (decoded is! Map) {
    throw FormatException(
        'WalletSendCalls: expected a JSON object, got ${decoded.runtimeType}');
  }
  return WalletSendCalls.fromJson(Map<String, dynamic>.from(decoded));
}