onAnimatedButtonLongPressMoveUpdate method

void onAnimatedButtonLongPressMoveUpdate(
  1. LongPressMoveUpdateDetails details
)

animated button on long press move -> track the slide-to-cancel position

Implementation

void onAnimatedButtonLongPressMoveUpdate(LongPressMoveUpdateDetails details) {
  if (!isText && _isRecording) {
    _duration = 0;
    _position = details.localPosition.dx * -1;
    notifyListeners();
  }
}