PackSet.fromBuffer constructor
PackSet.fromBuffer(
- List<int> data
)
Implementation
factory PackSet.fromBuffer(List<int> data) {
final decode =
LayoutSerializable.decode(bytes: data, layout: _Utils.layout);
return PackSet(
accountType: NFTPacksAccountType.fromValue(decode["accountType"]),
store: decode["store"],
authority: decode["authority"],
description: decode["description"],
uri: decode["uri"],
name: (decode["name"] as List).cast(),
packCards: decode["packCards"],
packVouchers: decode["packVouchers"],
totalWeight: decode["totalWeight"],
totalEditions: decode["totalEditions"],
mutable: decode["mutable"],
packState: PackSetState.fromValue(decode["packState"]),
distributionType:
PackDistributionType.fromValue(decode["distributionType"]),
allowedAmountToRedeem: decode["allowedAmountToRedeem"],
redeemStartDate: decode["redeemStartDate"],
redeemEndDate: decode["redeemEndDate"]);
}