decodeTo static method

List<Object> decodeTo(
  1. List to
)

Implementation

static List<Object> decodeTo(List to) {
  return to.map((i) {
    switch (i[1]['type']) {
      case 'Simple':
        return SimpleRecipient.fromJson(i as List);
      case 'Asset':
        return AssetRecipient.fromJson(i as List);
      default:
        throw ArgumentError('Transaction type currently not supported');
    }
  }).toList();
}