Token.fromJson constructor

Token.fromJson(
  1. Map<String, dynamic> map
)

Implementation

factory Token.fromJson(Map<String, dynamic> map) {
  return Token(
      address: map['address'],
      genesis: map['genesis'],
      name: map['name'],
      id: map['id'],
      supply: map['supply'] == null
          ? null
          : int.tryParse(map['supply'].toString()),
      type: map['type'],
      symbol: map['symbol'],
      aeip: map['aeip'] == null
          ? null
          : List<int>.from(map['aeip'].map((x) => x)),
      ownerships: map['ownerships'] == null
          ? null
          : List<Ownership>.from(
              map['ownerships'].map((dynamic x) => Ownership.fromJson(x)),),
      tokenProperties: map['properties'],);
}