v2.0.1route_transitions
一个包含路由有用动画的 Flutter 库。
67喜欢 262近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个包含有用动画和友好路由功能的 Flutter 库 🚦
{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
Now supports latest dart null safety . This package has been rewritten to use friendly route functions to navigate even with your favourite route transition and ability to build custom animations with tansitionBuilder !
import 'package:route_transitions/route_transitions.dart';
ElevatedButton(
onPressed: () => pushWidget(
newPage: Dashboard(),
context: context,
),
child: Text("Push page"),
),
For actual examples , check example/lib/main.dart
customAnimationWidgetcustomAnimationWidget(
newPage: YourPage(),
context: context,
transitionBuilder:
(context, animation, secondaryAnimation, child) {
var begin = 0.0;
var end = 1.0;
var curve = Curves.easeIn;
var tween = Tween(begin: begin, end: end)
.chain(CurveTween(curve: curve));
return ScaleTransition(
scale: animation.drive(tween),
child: child,
);
},
)