UserOperation.update constructor

UserOperation.update(
  1. String domainName,
  2. String schema
)

Implementation

factory UserOperation.update(String domainName, String schema) {
  final nativeDomainName = domainName.toNativeUtf8();
  final nativeSchema = schema.toNativeUtf8();
  try {
    final op = DartApi.native.coeusUserOperation
        .opUpdate(nativeDomainName, nativeSchema)
        .extract((res) => res.asPointer<Void>());
    return UserOperation(op, true);
  } finally {
    calloc.free(nativeSchema);
    calloc.free(nativeDomainName);
  }
}