111
This commit is contained in:
@@ -122,20 +122,26 @@ class AccountTrade {
|
||||
class AccountFlow {
|
||||
final int id;
|
||||
final int userId;
|
||||
final String flowNo;
|
||||
final String flowType;
|
||||
final String amount;
|
||||
final String balanceBefore;
|
||||
final String balanceAfter;
|
||||
final String coinCode;
|
||||
final String relatedOrderNo;
|
||||
final String remark;
|
||||
final DateTime? createTime;
|
||||
|
||||
AccountFlow({
|
||||
required this.id,
|
||||
required this.userId,
|
||||
required this.flowNo,
|
||||
required this.flowType,
|
||||
required this.amount,
|
||||
required this.balanceBefore,
|
||||
required this.balanceAfter,
|
||||
required this.coinCode,
|
||||
required this.relatedOrderNo,
|
||||
required this.remark,
|
||||
this.createTime,
|
||||
});
|
||||
@@ -144,10 +150,13 @@ class AccountFlow {
|
||||
return AccountFlow(
|
||||
id: json['id'] as int? ?? 0,
|
||||
userId: json['userId'] as int? ?? 0,
|
||||
flowNo: json['flowNo']?.toString() ?? '',
|
||||
flowType: json['flowType']?.toString() ?? '',
|
||||
amount: json['amount']?.toString() ?? '0.00',
|
||||
balanceBefore: json['balanceBefore']?.toString() ?? '0.00',
|
||||
balanceAfter: json['balanceAfter']?.toString() ?? '0.00',
|
||||
coinCode: json['coinCode']?.toString() ?? 'USDT',
|
||||
relatedOrderNo: json['relatedOrderNo']?.toString() ?? '',
|
||||
remark: json['remark']?.toString() ?? '',
|
||||
createTime: json['createTime'] != null
|
||||
? DateTime.tryParse(json['createTime'])
|
||||
|
||||
@@ -107,8 +107,7 @@ class Coin {
|
||||
/// 格式化價格顯示
|
||||
String get formattedPrice {
|
||||
if (price >= 1000) return price.toStringAsFixed(2);
|
||||
if (price >= 1) return price.toStringAsFixed(4);
|
||||
return price.toStringAsFixed(6);
|
||||
return price.toStringAsFixed(4);
|
||||
}
|
||||
|
||||
/// 格式化漲跌幅
|
||||
|
||||
Reference in New Issue
Block a user