DiagramEditorContext constructor

DiagramEditorContext({
  1. required PolicySet policySet,
})

DiagramEditorContext is taken as parameter by DiagramEditor widget.

Its not generated automatically because you want to use it to copy model or state to another DiagramEditor.

Implementation

DiagramEditorContext({
  required this.policySet,
})  : _canvasModel = CanvasModel(policySet),
      _canvasState = CanvasState() {
  policySet.initializePolicy(_getReader(), _getWriter());
}