LuaLike class
Bridge class to manage Dart-LuaLike interop.
Provides a high-level interface for interacting with LuaLike code from Dart, including function registration, code execution, and value exchange.
Constructors
- LuaLike()
-
Creates a new bridge with a fresh interpreter instance.
If an instance already exists, returns that instance.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vm → Interpreter
-
The underlying LuaLike interpreter instance.
final
Methods
-
call(
String functionName, List< Object?> args) → Future<Object?> - Call a LuaLike function from Dart
-
evaluate(
String code, {String? scriptPath}) → Future< Object?> - Evaluate LuaLike code and handle line information correctly
-
execute(
String code, {String? scriptPath}) → Future< Object?> - Run LuaLike code
-
expose(
String name, Function function) → void - Register a Dart function to be callable from LuaLike
-
getGlobal(
String name) → Object? - Get a value from LuaLike global environment Returns the raw Value object (not unwrapped)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setGlobal(
String name, Object? value) → void - Set a value in LuaLike global environment
-
throwError(
[String? message]) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited