update method

void update({
  1. MouseCursor? cursor,
  2. bool? panEnabled,
  3. TemporaryConnection? temporaryConnection,
})

Updates multiple state properties atomically.

Only non-null parameters will be updated. This is useful for updating multiple related state properties in a single action.

Parameters:

  • cursor - New mouse cursor to set
  • panEnabled - Whether panning should be enabled
  • temporaryConnection - New temporary connection state

Implementation

void update({
  MouseCursor? cursor,
  bool? panEnabled,
  TemporaryConnection? temporaryConnection,
}) {
  runInAction(() {
    if (cursor != null) currentCursor.value = cursor;
    if (panEnabled != null) this.panEnabled.value = panEnabled;
    if (temporaryConnection != null) {
      this.temporaryConnection.value = temporaryConnection;
    }
  });
}