stayOnScreen static method

Widget stayOnScreen(
  1. Widget child,
  2. Animation<double> animation
)

Keep widget on screen while it is leaving

Implementation

static Widget stayOnScreen(Widget child, Animation<double> animation) {
  return FadeTransition(
    opacity: Tween<double>(begin: 1.0, end: 1.0).animate(animation),
    child: child,
  );
}