routes.dart 447 B

12345678910111213141516
  1. import 'package:flutter/material.dart';
  2. import 'package:web_package/pages/home_page.dart';
  3. class Routes {
  4. static const String index = "/";
  5. static const String home = "/home";
  6. static Route onGenerateRoute(RouteSettings settings) {
  7. switch (settings.name) {
  8. case home:
  9. return MaterialPageRoute(builder: (_) => const HomePage());
  10. default:
  11. return MaterialPageRoute(builder: (_) => const HomePage());
  12. }
  13. }
  14. }