L1Info.fromJson constructor

L1Info.fromJson(
  1. Map<String, dynamic>? json
)

Implementation

factory L1Info.fromJson(Map<String, dynamic>? json) {
  if (json != null) {
    return L1Info(
      amountSuccess: json['amountSuccess'],
      depositAmount: json['depositAmount'],
      depositAmountSuccess: json['depositAmountSuccess'],
      ethereumBlockNum: json['ethereumBlockNum'],
      historicDepositAmountUSD:
          double.tryParse(json['historicDepositAmountUSD'].toString()) ?? 0.0,
      toForgeL1TransactionsNum: json['toForgeL1TransactionsNum'],
      userOrigin: json['userOrigin'],
    );
  } else {
    return L1Info();
  }
}