import 'package:flutter/material.dart'; import '../pages/about_page.dart'; import '../pages/home_page.dart'; import '../pages/not_found_page.dart'; import '../pages/settings_page.dart'; import '../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()); } } }