mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-18 15:29:35 +00:00
123
This commit is contained in:
parent
66439018fb
commit
861572db87
11 changed files with 326 additions and 209 deletions
|
|
@ -126,7 +126,7 @@ class MyAppRouter {
|
|||
GoRoute(
|
||||
path: Routes.library.localPath,
|
||||
name: Routes.library.name,
|
||||
pageBuilder: defaultPageBuilder(const LibraryPage()),
|
||||
pageBuilder: defaultPageBuilder(LibraryPage()),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -31,21 +31,24 @@ CustomTransitionPage buildPageWithDefaultTransition<T>({
|
|||
// transitionDuration: 1250.ms,
|
||||
// reverseTransitionDuration: 1250.ms,
|
||||
child: child,
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) =>
|
||||
FadeTransition(
|
||||
opacity: animation,
|
||||
child: SlideTransition(
|
||||
position: animation.drive(
|
||||
Tween(
|
||||
begin: const Offset(0, 1.50),
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
// 将 CurvedAnimation 提取出来,避免重复创建
|
||||
final curvedAnimation = animation.drive(
|
||||
CurveTween(curve: Curves.easeOut),
|
||||
);
|
||||
return FadeTransition(
|
||||
opacity: animation,
|
||||
child: SlideTransition(
|
||||
position: Tween(
|
||||
begin: const Offset(0, 0.3),
|
||||
end: Offset.zero,
|
||||
).chain(
|
||||
CurveTween(curve: Curves.easeOut),
|
||||
).animate(
|
||||
curvedAnimation,
|
||||
),
|
||||
child: child,
|
||||
),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue