closePath method

void closePath([
  1. Offset? point
])

Closes active path at given point.

Implementation

void closePath([Offset? point]) {
  assert(hasActivePath);

  final valid = _activePath?.end(point: point);

  if (valid == false) {
    _paths.removeLast();
  }

  _activePath = null;

  notifyListeners();
}