search download

This commit is contained in:
Simon Ding
2024-07-07 15:02:40 +08:00
parent 1c75ceb6ba
commit 6debad6eb9
6 changed files with 72 additions and 10 deletions

View File

@@ -55,7 +55,7 @@ class MyApp extends StatelessWidget {
routes: [
GoRoute(
path: WelcomePage.route,
builder: (context, state) => WelcomePage(),
builder: (context, state) => const WelcomePage(),
),
GoRoute(
path: SearchPage.route,
@@ -63,7 +63,7 @@ class MyApp extends StatelessWidget {
),
GoRoute(
path: SystemSettingsPage.route,
builder: (context, state) => SystemSettingsPage(),
builder: (context, state) => const SystemSettingsPage(),
),
GoRoute(
path: TvDetailsPage.route,
@@ -107,3 +107,16 @@ class MyApp extends StatelessWidget {
);
}
}
CustomTransitionPage buildPageWithDefaultTransition<T>({
required BuildContext context,
required GoRouterState state,
required Widget child,
}) {
return CustomTransitionPage<T>(
key: state.pageKey,
child: child,
transitionsBuilder: (context, animation, secondaryAnimation, child) =>
FadeTransition(opacity: animation, child: child),
);
}