import 'package:flutter/material.dart'; import 'package:userstory2translate/pages/about_page.dart'; import 'package:userstory2translate/pages/home_page.dart'; import 'package:userstory2translate/pages/not_found_page.dart'; import 'package:userstory2translate/pages/settings_page.dart'; import 'package:userstory2translate/router/route_constants.dart'; class CustomRouter { static Route generatedRoute(RouteSettings settings) { switch (settings.name) { case homeRoute: return MaterialPageRoute(builder: (_) => HomePage()); case aboutRoute: return MaterialPageRoute(builder: (_) => AboutPage()); case settingsRoute: return MaterialPageRoute(builder: (_) => SettingsPage()); default: return MaterialPageRoute(builder: (_) => NotFoundPage()); } } }