dismiss method

  1. @override
Future<void> dismiss({
  1. double currentPosition = 0.0,
})
override

Animate to dismiss the notification.

Implementation

@override
Future<void> dismiss({double currentPosition = 0.0}) async {
  currentAnimation = Tween(
    begin: currentPosition - _notificationHeight,
    end: -_notificationHeight,
  ).chain(_defaultCurve).animate(this);
  dragDistance = 0.0;

  await forward(from: 0.0);
  currentAnimation = null;
}