JSValue.makeBoolean constructor

JSValue.makeBoolean(
  1. JSContext context,
  2. bool boolean, {
  3. bool autoDispose = true,
})

Creates a JavaScript value of the boolean type. boolean The bool to assign to the newly created JSValue.

Implementation

JSValue.makeBoolean(this.context, bool boolean, {bool autoDispose = true})
  : _ref = JSValueMakeBoolean(context.ref, boolean) {
  attach(calloc.nativeFree, _ref.cast(), autoDispose: autoDispose);
}