TransactionBuilder constructor Null safety

TransactionBuilder(
  1. String txType
)

Implementation

TransactionBuilder(String txType) {
  if (!txTypes.containsKey(txType)) {
    throw 'Transaction type must be \'transfer\', \'hosting\', \'keychain_access\', \'keychain\',  \'nft\', \'code_proposal\', \'code_approval\'';
  }

  type = txType;
  version = cVersion;
  data = Data.fromJson({
    'content': Uint8List(0),
    'code': Uint8List(0),
    'keys': {'secret': Uint8List(0), 'authorizedKeys': {}},
    'ledger': {
      'uco': {'transfers': []},
      'nft': {'transfers': []}
    },
    'recipients': []
  });
}