过渡效果补充
您可以使用此包以惊人的动画方式在屏幕之间进行过渡。
缩放过渡演示
如何使用它
首先,您需要在pubspec.yml中添加它。
dependencies:
transition_plus: 0.0.12
然后将其导入到您的类中
import 'package:transition_plus/transition_plus.dart';
现在您可以使用了??
Navigator.push(context, ScaleTransition1(page: SecondPage())),
不同的动画
默认情况下,过渡从屏幕中心开始。您可以这样更改它
Navigator.push(context, ScaleTransition1(page: SecondPage(), type: ScaleTrasitionTypes.bottom)),
缩放过渡的动画类型列表
// trasition that start from bottom to top
bottom
// trasition that start from top to bottom
top
// trasition that start from bottom left
bottomLeft
// trasition that start from bottom right
bottomRight
// trasition that start from center
center
// trasition that start from right
right
// trasition that start from left
left
