JSValue.makeNumber constructor

JSValue.makeNumber(
  1. JSContext context,
  2. double number, {
  3. bool autoDispose = true,
})

Creates a JavaScript value of the number type. number The double to assign to the newly created JSValue.

Implementation

JSValue.makeNumber(this.context, double number, {bool autoDispose = true})
  : _ref = JSValueMakeNumber(context.ref, number) {
  attach(calloc.nativeFree, _ref.cast(), autoDispose: autoDispose);
}