fromString static method

Signature fromString(
  1. String str
)

Implementation

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