LuaObject.table constructor

LuaObject.table(
  1. String id,
  2. Map<String, Object?> fields
)

Constructs a lua object with id for its variable name in scope with some set of fields.

Implementation

LuaObject.table(this.id, Map<String, Object?> fields) : super() {
  _fields = fields.map(
    (k, v) => MapEntry(k, v?.toLua(k) ?? LuaObject.nil(k)),
  );
}