jean 1 月之前
父節點
當前提交
5bf61ce7f7
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      lib/data/models/asset/today_pnl.dart

+ 3 - 3
lib/data/models/asset/today_pnl.dart

@@ -10,14 +10,14 @@ class AccountInfo {
   /// 已释放总量(与质押币种同单位,如 iBit;质押账户专用)
   final Decimal releasedTotal;
 
-  const AccountInfo({
+  AccountInfo({
     required this.name,
     required this.balance,
     required this.frozenBalance,
     required this.frozenMargin,
     required this.currentCapital,
-    this.releasedTotal = Decimal.zero,
-  });
+    Decimal? releasedTotal,
+  }) : releasedTotal = releasedTotal ?? Decimal.zero;
 
   factory AccountInfo.fromJson(Map<String, dynamic> json) {
     return AccountInfo(