data: The initial value of the managed state.
This can usually be null.
This value is assigned by the factory constructor when the data is
restored.
This value is not subject to automatic copying.
(en) Adds a listener for UI updates associated with the specified
slot and ID.
Normally, you should not use this directly. Instead, consider using
a class that extends SlotStatefulWidget or StateSlotBuilder.
(en) Joins the given group for coordinated batch processing.
When this state belongs to a group, calling batch on any member
will batch all states in the group together.
(en) Deletes the UI update listener associated with the specified
slot and ID.
Normally, you should not use this directly. Instead, consider using
a class that extends SlotStatefulWidget or StateSlotBuilder.
(en) For operations such as Undo, the current listeners are retained and
only the data is replaced. The data is deep copied.
After that, notifications are sent to all UI listeners in a batch process
to update.
In other words, the screen the user currently has open is automatically
updated.
(en) Adds a debug listener for developers.
This listener will notify you of any value changes whenever they are made.
Please note that this means that any intermediate changes to values
will be tracked during batch processing, etc.
(en) This is a set method dedicated to setting the initial value of
the Slot. This method does not notify listeners.
The value you set is deep-copied internally.
(en) Adds a listener suitable for managing Undo and Redo.
This listener will only notify when the value change is confirmed.
For this reason, in batch processing, etc.,
notification will only be sent once at the end of the processing.
(en) Convert the object to a dictionary.
The returned dictionary can only contain primitive types, null, lists
or maps with only primitive elements.
If you want to include other classes,
the target class should inherit from this class and chain calls toDict.