FlutterJsPlatformEmpty class

Inheritance
Available extensions

Constructors

FlutterJsPlatformEmpty()

Properties

dartContext Map<String, dynamic>
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
localContext Map<String, dynamic>
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
webApis JsWebApis
Web platform APIs installed by init and reinstalled after resets.
no setterinherited

Methods

callFunction(Pointer<NativeType> fn, Pointer<NativeType> obj) JsEvalResult
override
compile(String code, String fileName, {bool stripSource = false, bool asModule = false}) Uint8List
Compile code to bytecode. stripSource drops function source text: a smaller heap, but Function.prototype.toString no longer shows it.
inherited
convertValue<T>(JsEvalResult jsValue) → T?
override
createWebNatives() Object?
Engine-specific native helpers handed to the Web API layer, or null.
inherited
dispose() → void
override
disposeChannelFunctions() → void
Removes channel registrations for this engine (call from dispose).
inherited
enableHandlePromises() → void

Available on JavascriptRuntime, provided by the HandlePromises extension

Optional no-op friendly setup for callers that still invoke this.
evaluate(String code, {String? sourceUrl}) JsEvalResult
override
evaluateAsync(String code, {String? sourceUrl}) Future<JsEvalResult>
override
evaluateAsyncBytecode(Uint8List bytecode) Future<JsEvalResult>
inherited
evaluateBytecode(Uint8List bytecode) JsEvalResult
inherited
evaluateJson(String code, {String? sourceUrl}) → dynamic
override
evaluateJsonBatch(Iterable<String> expressions, {String? sourceUrl}) List
Evaluate multiple JavaScript expressions and decode the results through one JSON round-trip. Expressions must be JSON-serializable and are evaluated in order in the same runtime.
inherited
executePendingJob() int
override
executePendingJobs({int maxJobs = 10000}) int
Drain the QuickJS job queue until empty or maxJobs jobs run. Returns the number of jobs executed, or stops early on error (-1 job).
inherited
getEngineInstanceId() String
override
getMemoryUsage() JsMemoryUsage?
QuickJS heap usage snapshot, or null if unavailable.
inherited
handlePromise(JsEvalResult value, {Duration? timeout}) Future<JsEvalResult>

Available on JavascriptRuntime, provided by the HandlePromises extension

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)) → void
inherited
registerModuleBytecode(Uint8List bytecode, {bool resolve = false}) → void
Register module bytecode in the current context without running it, so that import of its name resolves from the context instead of calling the module loader. With resolve, the module's own imports are linked now (every dependency must already be registered).
inherited
reinitialize() → void
Drop native heap and re-run channel / Web API setup. Used by JsEnginePool when resetting a leased engine. Default is no-op.
inherited
releaseHostCaches() → void
Free Dart-side JS refs that must not outlive close; call before native free. Cancels Web API timers and host work installed by init.
inherited
runGC() → void
Force a QuickJS GC pass. No-op if the engine is not ready / disposed.
inherited
sendMessage({required String channelName, required List<String> args, String? uuid}) → void
Dart → JS message helper. Prefer not to inject untrusted strings into evaluate; use registered bridges + sendMessage from JS instead.
inherited
setInspectable(bool inspectable) → void
override
setupBridge(String channelName, void fn(dynamic args)) bool
override
softReset() → void
Clear tenant state without destroying the native QuickJS engine.
inherited
toString() String
A string representation of this object.
inherited

Operators

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