fromString static method

PublicKey fromString(
  1. String str
)

Implementation

static PublicKey fromString(String str) {
  final nativeStr = str.toNativeUtf8();
  try {
    final pk = DartApi.native.publicKey
        .fromString(nativeStr)
        .extract((res) => res.asPointer<Void>());
    return PublicKey(pk, true);
  } finally {
    calloc.free(nativeStr);
  }
}