ScriptedHost class abstract

One stage scripted object running on a file's wasm VM. The Dart core object owns it and forwards every protocol call.

Constructors

ScriptedHost()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isActive → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

advance(double elapsedSeconds) → bool
booleanMethod(String name) → bool
dataConvert(String method, ScriptDataKind kind, {double number = 0, String text = '', bool boolean = false, int color = 0}) → ScriptDataResult
dispose() → void
Frees the native host; disposes the script first.
draw(Renderer renderer) → void
gamepadEvent(String method, GamepadWire gamepad) → bool
instantiate(String moduleName) → bool
Runs the generator registered for moduleName in the file.
keyboardEvent(int key, int modifiers, bool isPressed, bool isRepeat) → bool
layoutMeasure() → Vec2D?
Null when the script does not implement measure.
layoutResize(double width, double height) → void
listenerFocus(bool isFocus) → void
listenerGamepad(GamepadWire gamepad) → void
listenerKeyboard(int key, int modifiers, bool isPressed, bool isRepeat) → void
listenerNone() → void
listenerPointer(int pointerId, Vec2D position, Vec2D previousPosition, int hitType, double timeStamp) → void
listenerReportedEvent(double delaySeconds) → void
listenerTextInput(String text) → void
listenerViewModelChange() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numberMethod(String name, List<double> args) → double?
Null when the script does not implement name.
pathEffect(Factory factory, RenderPath source, PathEffectPaint paint) → RenderPath?
Null when the script did not run; the caller keeps the source path.
pointerEvent(String method, int pointerId, Vec2D localPosition, {required int hitType, required double timeStamp}) → HitResult?
Null when the script does not implement method.
setArtboardInput(String name, Artboard artboard) → void
setBooleanInput(String name, bool value) → void
setDataContext(InternalDataContext? dataContext) → void
setImplementedMethods(int bits) → void
setIntegerInput(String name, int value) → void
setNumberInput(String name, double value) → void
setStringInput(String name, String value) → void
setViewModelInput(String name, InternalViewModelInstanceValue value) → void
takeDisplayScaleChanged() → bool
takeNeedsUpdate() → bool
True once since the last call when the script asked for an update.
textEvent(String text) → bool
toString() → String
A string representation of this object.
inherited
trigger(String name) → void
update() → void
userInit() → bool
Calls init once the inputs are set; false tears the instance down.

Operators

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

Static Methods

make(File file, int protocol) → ScriptedHost?
protocol is the runtime's ScriptProtocol index.