setSecret method Null safety
- dynamic secret
Implementation
TransactionBuilder setSecret(secret) {
if (!(secret is Uint8List) && !(secret is String)) {
throw "'secret' must be a string or Uint8List";
}
if (secret is String) {
if (isHex(secret)) {
secret = hexToUint8List(secret);
} else {
secret = Uint8List.fromList(utf8.encode(secret));
}
}
data!.keys!.secret = secret;
return this;
}