UGoldUserBalanceResponse.fromMap constructor
UGoldUserBalanceResponse.fromMap(
- Map<String, dynamic> json
)
Implementation
factory UGoldUserBalanceResponse.fromMap(Map<String, dynamic> json) => UGoldUserBalanceResponse(
balance: json["balance"] == null ? 0 : (json["balance"] as num).toDouble(),
buyUnitPrice: json["buyUnitPrice"] == null ? null : (json["buyUnitPrice"] as num).toDouble(),
sellUnitPrice: json["sellUnitPrice"] == null ? null : (json["sellUnitPrice"] as num).toDouble(),
value: json["value"] == null ? null : (json["value"] as num).toDouble(),
unit: json["unit"],
updatedAt: json["updatedAt"] == null ? null : DateTime.parse(json["updatedAt"]),
);