AuctionStateActive.fromJson constructor
Parses a AuctionStateActive from TDLib JSON.
Implementation
factory AuctionStateActive.fromJson(Map<String, dynamic> json) =>
AuctionStateActive(
startDate: _readInt(json['start_date']),
endDate: _readInt(json['end_date']),
minBid: _readInt(json['min_bid']),
bidLevels: _readList<AuctionBid>(
json['bid_levels'],
(e) => _readObject(e, AuctionBid.fromJson),
),
topBidderUserIds: _readList<int>(json['top_bidder_user_ids'], _readInt),
rounds: _readList<AuctionRound>(
json['rounds'],
(e) => _readObject(e, AuctionRound.fromJson),
),
currentRoundEndDate: _readInt(json['current_round_end_date']),
currentRoundNumber: _readInt(json['current_round_number']),
totalRoundCount: _readInt(json['total_round_count']),
distributedItemCount: _readInt(json['distributed_item_count']),
leftItemCount: _readInt(json['left_item_count']),
acquiredItemCount: _readInt(json['acquired_item_count']),
userBid: _readOptional(json['user_bid'], UserAuctionBid.fromJson),
);