fromJson static method
Implementation
static GiftResaleParameters? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return GiftResaleParameters(
starCount: (json['star_count'] as int?) ?? 0,
gramCentCount: (json['gram_cent_count'] as int?) ?? 0,
gramAmount: (json['gram_amount'] is int
? json['gram_amount'] as int
: int.tryParse(json['gram_amount']?.toString() ?? '')) ??
0,
gramOnly: (json['gram_only'] as bool?) ?? false,
isFixedOnChain: (json['is_fixed_on_chain'] as bool?) ?? false,
canBeManaged: (json['can_be_managed'] as bool?) ?? false,
);
}