QuickJsRuntime2 class

Quickjs engine for flutter.

Inheritance
Available extensions

Constructors

QuickJsRuntime2({_JsModuleHandler? moduleHandler, int stackSize = 1024 * 1024, int? timeout, int? memoryLimit, _JsHostPromiseRejectionHandler? hostPromiseRejectionHandler})

Properties

dartContext Map<String, dynamic>
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hostPromiseRejectionHandler → _JsHostPromiseRejectionHandler?
Handler function to manage js module.
final
localContext Map<String, dynamic>
getter/setter pairinherited
memoryLimit int?
Max memory for quickjs.
final
moduleHandler → _JsModuleHandler?
Handler function to manage js module.
final
port ReceivePort
Message Port for event loop. Close it to stop dispatching event loop.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackSize int
Max stack size for quickjs.
getter/setter pair
timeout int?
Max stack size for quickjs.
final

Methods

callFunction(Pointer<NativeType> fn, Pointer<NativeType> obj) JsEvalResult
override
close() → dynamic
Free Runtime and Context which can be recreate when evaluate again.
convertValue<T>(JsEvalResult jsValue) → T?
override
dispatch() Future<void>
Dispatch JavaScript Event loop.
dispose() → void
override
evaluate(String command, {String? name, int? evalFlags, String? sourceUrl}) JsEvalResult
Evaluate js script.
override
evaluateAsync(String code, {String? sourceUrl}) Future<JsEvalResult>
override
executePendingJob() int
override
getEngineInstanceId() String
override
init() JavascriptRuntime
inherited
initChannelFunctions() → void
override
jsonStringify(JsEvalResult jsValue) String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMessage(String channelName, dynamic fn(dynamic args)) → dynamic
inherited
sendMessage({required String channelName, required List<String> args, String? uuid}) → dynamic
inherited
setInspectable(bool inspectable) → void
override
setupBridge(String channelName, void fn(dynamic args)) bool
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited