toggleDrawing method

void toggleDrawing([
  1. bool? open
])

Opens or closes the drawing toolbar.

Implementation

void toggleDrawing([bool? open]) {
  final bool next = open ?? !_drawOpen;
  if (next && !_draw.isActive) _draw.tool = UDocDrawTool.pen;
  if (!next) _draw.tool = UDocDrawTool.none;
  _clearSelection();
  setState(() {
    _drawOpen = next;
    _activeMarkup = null;
    _chromeVisible = true;
  });
}