PanUpdate method

dynamic PanUpdate(
  1. dynamic context,
  2. dynamic details,
  3. dynamic selectedColor,
  4. dynamic strokeWidth,
  5. dynamic opacity,
)

Implementation

PanUpdate(context,details,selectedColor,strokeWidth,opacity){
  if(details==null){
      selectedColor=selectedColor;
      opacity=opacity;
      strokeWidth=strokeWidth;
  }
  else{
     selectedColor=selectedColor;
      opacity=opacity;
      strokeWidth=strokeWidth;
    RenderBox? renderBox = context.findRenderObject() as RenderBox;
            points.add(DrawingPoints(
                points: renderBox.globalToLocal(details.globalPosition),
                paint: Paint()
                  ..strokeCap = strokeCap
                  ..isAntiAlias = true
                  ..color = selectedColor.withOpacity(opacity)
                  ..strokeWidth = strokeWidth));
                  return points;
  }
          }