animatedOffset method

Future animatedOffset(
  1. Offset offset, {
  2. Duration? duration,
  3. Curve? curve,
})

Implementation

Future animatedOffset(
  Offset offset, {
  Duration? duration,
  Curve? curve,
}) async {
  if (duration != null) {
    _buttonAC.duration = duration;
  }
  _offsetTween = Tween<Offset>(
    begin: offsetNotifier.value,
    end: offset,
  ).animate(
    CurvedAnimation(
      parent: _buttonAC,
      curve: curve ?? stickyAnimation,
    ),
  );
  _buttonAC.reset();
  _buttonAC.forward();
}