onPanStart method

void onPanStart(
  1. DragStartDetails details
)

Implementation

void onPanStart(DragStartDetails details) {
  final localPosition = details.localPosition;
  if (_isPointInBounds(localPosition)) {
    _hasPanned = true;

    if (!_isDrawing) {
      _isDrawing = true;
      _currentStroke = [localPosition];
      _currentPath = Path();
    }

    if (_currentPath.getBounds().isEmpty) {
      _currentPath.moveTo(localPosition.dx, localPosition.dy);
    }
    notifyListeners();
  }
}