L2Info.fromJson constructor

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

Implementation

factory L2Info.fromJson(Map<String, dynamic>? json) {
  if (json != null) {
    return L2Info(
      fee: json['fee'],
      historicFeeUSD:
          double.tryParse(json['historicFeeUSD'].toString()) ?? 0.0,
      nonce: json['nonce'],
    );
  } else {
    return L2Info();
  }
}