PanStart method

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

Implementation

PanStart(context,details,selectedColor,strokeWidth,opacity){
  if(details==null){
        selectedColor=selectedColor;
        opacity=opacity;
        strokeWidth=strokeWidth;
    }
    else{
      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;
    }
  }