defaultDiagramTools function

List<DiagramToolDefinition> defaultDiagramTools()

Optional defaults. Applications may omit, replace, or add registrations.

Implementation

List<DiagramToolDefinition> defaultDiagramTools() => const [
  DiagramToolDefinition(
    id: DiagramTools.select,
    label: 'Selection',
    shortcut: DiagramShortcut('v'),
    behavior: DiagramSelectionTool(),
  ),
  DiagramToolDefinition(
    id: DiagramTools.draw,
    label: 'Draw',
    shortcut: DiagramShortcut('d'),
    behavior: DiagramFreehandTool(),
  ),
  DiagramToolDefinition(
    id: DiagramTools.eraser,
    label: 'Eraser',
    shortcut: DiagramShortcut('e'),
    behavior: DiagramEraserTool(),
  ),
  DiagramToolDefinition(
    id: DiagramTools.connector,
    label: 'Connector',
    shortcut: DiagramShortcut('l'),
    behavior: DiagramConnectorTool(),
  ),
  DiagramToolDefinition(
    id: DiagramTools.rectangle,
    label: 'Rectangle',
    shortcut: DiagramShortcut('r'),
    group: 'shapes',
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.rectangle),
  ),
  DiagramToolDefinition(
    id: DiagramTools.ellipse,
    label: 'Ellipse',
    shortcut: DiagramShortcut('o'),
    group: 'shapes',
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.ellipse),
  ),
  DiagramToolDefinition(
    id: DiagramTools.path,
    label: 'Path',
    shortcut: DiagramShortcut('p'),
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.path),
  ),
  DiagramToolDefinition(
    id: DiagramTools.polygon,
    label: 'Polygon',
    shortcut: DiagramShortcut('g'),
    group: 'shapes',
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.polygon),
  ),
  DiagramToolDefinition(
    id: DiagramTools.card,
    label: 'Card',
    group: 'shapes',
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.card),
  ),
  DiagramToolDefinition(
    id: DiagramTools.text,
    label: 'Text box',
    shortcut: DiagramShortcut('t'),
    returnToDefault: true,
    behavior: DiagramTextTool(),
  ),
  DiagramToolDefinition(
    id: DiagramTools.comment,
    label: 'Comment',
    shortcut: DiagramShortcut('n'),
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.comment),
  ),
  DiagramToolDefinition(
    id: DiagramTools.image,
    label: 'Image',
    shortcut: DiagramShortcut('i'),
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.image),
  ),
  DiagramToolDefinition(
    id: DiagramTools.frame,
    label: 'Frame',
    shortcut: DiagramShortcut('f'),
    returnToDefault: true,
    behavior: DiagramShapeTool(shapeType: Shapes.frame),
  ),
];