diff --git a/lib/config/transitions.dart b/lib/config/transitions.dart index 000e4b8e..ff957ba4 100644 --- a/lib/config/transitions.dart +++ b/lib/config/transitions.dart @@ -3,9 +3,6 @@ import "package:auto_route/auto_route.dart"; // TODO(simon-the-shark): adjust this settings if desired abstract class TransitionsConfig { static const durationInMiliseconds = 200; - static const detailDurationInMiliseconds = 200; static const slideLeftBuilder = TransitionsBuilders.slideLeftWithFade; static const slideRightBuilder = TransitionsBuilders.slideRightWithFade; - static const fallbackBuilder = TransitionsBuilders.fadeIn; - static const detailViewBuilder = TransitionsBuilders.slideBottom; } diff --git a/lib/features/navigator/app_router.dart b/lib/features/navigator/app_router.dart index 182e49a9..cc04a24f 100644 --- a/lib/features/navigator/app_router.dart +++ b/lib/features/navigator/app_router.dart @@ -1,5 +1,4 @@ import "package:auto_route/auto_route.dart"; -import "package:flutter/foundation.dart"; import "package:flutter/material.dart"; import "package:flutter_riverpod/flutter_riverpod.dart"; import "package:riverpod_annotation/riverpod_annotation.dart"; @@ -67,14 +66,9 @@ class AppRouter extends _$AppRouter { transitionsBuilder: ref.tabBarTransitionBuilder(DepartmentsRoute.name), ), - CustomRoute( + AutoRoute( path: "departments/:id", page: DepartmentDetailRoute.page, - durationInMilliseconds: - TransitionsConfig.detailDurationInMiliseconds, - reverseDurationInMilliseconds: - TransitionsConfig.detailDurationInMiliseconds, - transitionsBuilder: TransitionsConfig.detailViewBuilder, ), CustomRoute( path: "sci-clubs", @@ -85,14 +79,9 @@ class AppRouter extends _$AppRouter { transitionsBuilder: ref.tabBarTransitionBuilder(ScienceClubsRoute.name), ), - CustomRoute( + AutoRoute( path: "sci-clubs/:id", page: ScienceClubDetailRoute.page, - durationInMilliseconds: - TransitionsConfig.detailDurationInMiliseconds, - reverseDurationInMilliseconds: - TransitionsConfig.detailDurationInMiliseconds, - transitionsBuilder: TransitionsConfig.detailViewBuilder, ), CustomRoute( path: "guide", @@ -102,14 +91,9 @@ class AppRouter extends _$AppRouter { TransitionsConfig.durationInMiliseconds, transitionsBuilder: ref.tabBarTransitionBuilder(GuideRoute.name), ), - CustomRoute( + AutoRoute( path: "aboutUs", page: AboutUsRoute.page, - durationInMilliseconds: - TransitionsConfig.detailDurationInMiliseconds, - reverseDurationInMilliseconds: - TransitionsConfig.detailDurationInMiliseconds, - transitionsBuilder: TransitionsConfig.detailViewBuilder, ), ], ),