onHorizontalDragUpdate method Null safety

void onHorizontalDragUpdate(
  1. DragUpdateDetails details
)

Implementation

void onHorizontalDragUpdate(DragUpdateDetails details) {
  translateX = (translateX + details.delta.dx).clamp(-maxDragDistance, 0.0);

  setState(() {});
}