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,
);
},
)