/* * Use **`GestureDetector.onPanUpdate`**: * ```dart * GestureDetector( * onPanUpdate: (details) { */ // Swiping in right direction. if (details.delta.dx > 0) {} // Swiping in left direction. if (details.delta.dx < 0) {} /* * }, * child: YourWidget(), * ) * ``` * * --- * * To cover all the area (passing the parent constraints to the widget), * you can include `SizedBox.expand`. * * ```dart * SizedBox.expand( * child: GestureDetector( */ onPanUpdate: (details) { // Swiping in