fromJson static method

AuctionState? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static AuctionState? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case AuctionStateActive.constructor:
      return AuctionStateActive.fromJson(json);

    case AuctionStateFinished.constructor:
      return AuctionStateFinished.fromJson(json);

    default:
      return null;
  }
}