DiagramEditorState class final
An immutable editor snapshot: the document, the installed extensions' options and the participant's local state.
The participant state is the selection, camera, active tool, active connector route and creation styles. Use copyWith to derive a changed state.
Constructors
- DiagramEditorState({required DiagramDocument document, required DiagramSelection selection, required DiagramCameraState camera, DiagramOptions options = DiagramOptions.empty, DiagramTool activeTool = DiagramTools.select, ConnectorRoute activeConnectorRoute = ConnectorRoute.straight, DiagramCreationStyles creationStyles = const DiagramCreationStyles()})
- DiagramEditorState.initial(DiagramDocument document)
-
factory
- DiagramEditorState.withParticipant({required DiagramDocument document, required DiagramParticipantState participant, DiagramOptions options = DiagramOptions.empty})
-
const
Properties
- activeConnectorRoute → ConnectorRoute
-
no setter
- activeTool → DiagramTool
-
no setter
- camera → DiagramCameraState
-
no setter
- creationStyles → DiagramCreationStyles
-
no setter
- document → DiagramDocument
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → DiagramOptions
-
The installed extensions' options and the canvas bounds.
final
- participant → DiagramParticipantState
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection → DiagramSelection
-
no setter
Methods
-
copyWith(
{DiagramDocument? document, DiagramSelection? selection, DiagramCameraState? camera, DiagramOptions? options, DiagramTool? activeTool, ConnectorRoute? activeConnectorRoute, DiagramCreationStyles? creationStyles}) → DiagramEditorState -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited