Animation<Offset> slideAnimation(Animation<double> animation) { return Tween<Offset>( begin: slideTransitionType.offset, end: Offset.zero, ).animate(animation); }