handleUpdateBackGestureProgress method

  1. @override
void handleUpdateBackGestureProgress({
  1. required double progress,
})
override

Handles a predictive back gesture updating as the user drags across the screen.

The progress parameter indicates the progress of the gesture from 0.0 to 1.0, as in PredictiveBackEvent.progress.

Implementation

@override
void handleUpdateBackGestureProgress({required double progress}) {
  if (!_predictiveBack) {
    return;
  }
  final double value = _predictiveBackFrom - _predictiveBackDepth * progress;
  _flight?.controller.updateScrub(value < 0 ? 0 : value);
}