BatchSendStatusType.fromJson constructor

BatchSendStatusType.fromJson(
  1. dynamic data
)

Implementation

factory BatchSendStatusType.fromJson(dynamic data) {
  var gasObjects = data['transferred_gas_objects'];
  if (gasObjects != null) {
    gasObjects = (gasObjects["sent"] as List)
      .map((x) => FaucetCoinInfo.fromJson(x))
      .toList();
  }

  return BatchSendStatusType(
    BatchSendStatus.values.byName(data['status']),
    gasObjects
  );
}