JSValue.newAtomString constructor

JSValue.newAtomString(
  1. JSContext _ctx,
  2. String str, {
  3. bool autoDispose = true,
})

JS_NewAtomString

Implementation

// @deprecated
JSValue.newAtomString(this._ctx, String str, {bool autoDispose = true}) {
  _str = str.toNativeUtf8();
  _ref = calloc.call<JSValue_>(sizeOf<JSValue_>())
    ..ref = JS_NewAtomString(_ctx.ref, _str!);
  attach(Q_JS_FreeValueAddress.cast(), _ref.cast(), autoDispose: autoDispose);
}