fromString static method

Did fromString(
  1. String str
)

Implementation

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