Skip to content

Commit

Permalink
Merge branch 'master' into skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisPhilippeHeon authored Jul 11, 2024
2 parents 4d37828 + 85078ec commit 5623486
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions lib/features/app/navigation/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,9 @@ Route<dynamic> generateRoute(RouteSettings routeSettings) {
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => StudentView());
case RouterPaths.gradeDetails:
return PageRouteBuilder(
transitionDuration: const Duration(milliseconds: 600),
transitionsBuilder: (context, animation, secondaryAnimation, child) {
const begin = Offset(0.0, 1.0);
const end = Offset.zero;
const curve = Curves.ease;

final tween =
Tween(begin: begin, end: end).chain(CurveTween(curve: curve));

return SlideTransition(
position: animation.drive(tween),
child: child,
);
},
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) =>
builder: (context) =>
GradesDetailsView(course: routeSettings.arguments! as Course));
case RouterPaths.ets:
return PageRouteBuilder(
Expand Down Expand Up @@ -115,34 +101,33 @@ Route<dynamic> generateRoute(RouteSettings routeSettings) {
authorId: routeSettings.arguments! as String,
));
case RouterPaths.webView:
return PageRouteBuilder(
pageBuilder: (_, __, ___) =>
LinkWebView(routeSettings.arguments! as QuickLink));
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
builder: (_) => LinkWebView(routeSettings.arguments! as QuickLink));
case RouterPaths.security:
return PageRouteBuilder(
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => SecurityView());
builder: (_) => SecurityView());
case RouterPaths.more:
return PageRouteBuilder(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => MoreView());
case RouterPaths.settings:
return PageRouteBuilder(
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => SettingsView());
builder: (_) => SettingsView());
case RouterPaths.contributors:
return PageRouteBuilder(
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => ContributorsView());
builder: (_) => ContributorsView());
case RouterPaths.feedback:
return PageRouteBuilder(
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => FeedbackView());
builder: (_) => FeedbackView());
case RouterPaths.about:
return PageRouteBuilder(
transitionDuration: const Duration(seconds: 1),
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
pageBuilder: (_, __, ___) => AboutView());
builder: (_) => AboutView());
case RouterPaths.chooseLanguage:
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
Expand Down

0 comments on commit 5623486

Please sign in to comment.