startPath method

void startPath(
  1. Offset point, {
  2. double? pressure,
})

Starts new line at given point.

Implementation

void startPath(Offset point, {double? pressure}) {
  assert(!hasActivePath);

  _activePath = CubicPath(setup: setup.call());

  _activePath!.begin(
    point,
    velocity: _paths.isNotEmpty ? _paths.last._currentVelocity : 0.0,
    pressure: pressure,
  );

  _paths.add(_activePath!);
}