onWrite method

void onWrite(
  1. dynamic callback(
    1. String,
    2. Object?
    )?
)

Whenever a lua object's fields or value is modified (written), executes callback. If the lua object's storage is value, then the first argument of callback will be 'self'. Otherwise it is the string name of the field's key.

Implementation

void onWrite(Function(String, Object?)? callback) => _onWrite = callback;