DiagramEditorContext.withSharedState constructor
DiagramEditorContext.withSharedState(
Allows you to create DiagramEditorContext with shared state (eg. canvas position and scale) from another DiagramEditorContext.
Implementation
DiagramEditorContext.withSharedState(
DiagramEditorContext oldContext, {
required this.policySet,
}) : _canvasModel = CanvasModel(policySet),
_canvasState = oldContext.canvasState {
policySet.initializePolicy(_getReader(), _getWriter());
}