mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-05-17 21:05:59 +08:00
Disabled Cupertino page translations when animations disabled in Router. Also cleaned it a bit.
This commit is contained in:
@ -42,24 +42,20 @@ class ScreenPaths {
|
||||
|
||||
// Routes that are used multiple times
|
||||
AppRoute get _artifactRoute => AppRoute(
|
||||
'artifact/:artifactId',
|
||||
(s) => ArtifactDetailsScreen(artifactId: s.pathParameters['artifactId']!),
|
||||
);
|
||||
'artifact/:artifactId',
|
||||
(s) => ArtifactDetailsScreen(artifactId: s.pathParameters['artifactId']!),
|
||||
);
|
||||
|
||||
AppRoute get _timelineRoute {
|
||||
return AppRoute(
|
||||
'timeline',
|
||||
(s) => TimelineScreen(type: _tryParseWonderType(s.uri.queryParameters['type']!)),
|
||||
);
|
||||
}
|
||||
AppRoute get _timelineRoute => AppRoute(
|
||||
'timeline',
|
||||
(s) => TimelineScreen(type: _tryParseWonderType(s.uri.queryParameters['type']!)),
|
||||
);
|
||||
|
||||
AppRoute get _collectionRoute {
|
||||
return AppRoute(
|
||||
'collection',
|
||||
(s) => CollectionScreen(fromId: s.uri.queryParameters['id'] ?? ''),
|
||||
routes: [_artifactRoute],
|
||||
);
|
||||
}
|
||||
AppRoute get _collectionRoute => AppRoute(
|
||||
'collection',
|
||||
(s) => CollectionScreen(fromId: s.uri.queryParameters['id'] ?? ''),
|
||||
routes: [_artifactRoute],
|
||||
);
|
||||
|
||||
/// Routing table, matches string paths to UI Screens, optionally parses params from the paths
|
||||
final appRouter = GoRouter(
|
||||
@ -132,7 +128,7 @@ class AppRoute extends GoRoute {
|
||||
body: builder(state),
|
||||
resizeToAvoidBottomInset: false,
|
||||
);
|
||||
if (useFade) {
|
||||
if (useFade || $styles.disableAnimations) {
|
||||
return CustomTransitionPage(
|
||||
key: state.pageKey,
|
||||
child: pageContent,
|
||||
|
Reference in New Issue
Block a user