fromJson static method

TransactionInfo<Object> fromJson(
  1. Map<String, dynamic> json
)
override

Creates an instance of this class from the constructor parameters defined in the json object.

Example

class Item extends Serializable {
  const(this.name, this.count);
  final String name;
  final int? count;
}

final Item x = Item.fromJson({
  'name': 'apple',
  'count': 10,
});

Implementation

static TransactionInfo fromJson(final Map<String, dynamic> json) {
  final TransactionData data = TransactionData.fromJson(json);
  return TransactionInfo(
    transaction: data.transaction,
    meta: data.meta,
    version: data.version,
    slot: json['slot'],
    blockTime: json['blockTime'],
  );
}