update method
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 setpanEnabled- Whether panning should be enabledtemporaryConnection- 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;
}
});
}