import 'package:desktopapp/widgets/pages/home.dart'; import 'package:desktopapp/widgets/pages/tutorial.dart'; import 'package:flutter/material.dart'; enum Routes { streamlabsTutorial, home } extension RoutesExtension on Routes { String get path { switch (this) { case Routes.streamlabsTutorial: return '/streamlabs/tutorial'; case Routes.home: return '/home'; } } } var routes = { Routes.streamlabsTutorial.path: (context) => TutorialPage(), Routes.home.path: (context) => const HomePage(), }; var initialRoute = Routes.streamlabsTutorial.path;