SimulateTransactionResult.fromJson constructor Null safety

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

Implementation

factory SimulateTransactionResult.fromJson(Map<String, dynamic> json) {
  String xdr = json['xdr'];
  Footprint? footprint;
  String? footStr = json['footprint'];
  if (footStr != null && footStr.trim() != "") {
    footprint =
        Footprint(XdrLedgerFootprint.fromBase64EncodedXdrString(footStr));
  }
  List<String>? auth;
  if (json['auth'] != null) {
    auth = List<String>.from(json['auth'].map((e) => e));
  }
  return SimulateTransactionResult(xdr, footprint, auth);
}