27 lines
797 B
Dart
27 lines
797 B
Dart
import 'package:desktopapp/widgets/pages/home.dart';
|
|
import 'package:desktopapp/widgets/pages/settings.dart';
|
|
import 'package:desktopapp/widgets/pages/tutorial.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
enum Routes { streamlabsTutorial, home, mailSettings }
|
|
|
|
extension RoutesExtension on Routes {
|
|
String get path {
|
|
switch (this) {
|
|
case Routes.streamlabsTutorial:
|
|
return '/streamlabs/tutorial';
|
|
case Routes.home:
|
|
return '/home';
|
|
case Routes.mailSettings:
|
|
return '/mail/settings';
|
|
}
|
|
}
|
|
}
|
|
|
|
var routes = <String, WidgetBuilder>{
|
|
Routes.streamlabsTutorial.path: (context) => TutorialPage(),
|
|
Routes.home.path: (context) => const HomePage(),
|
|
Routes.mailSettings.path: (context) => const Settings(),
|
|
};
|
|
|
|
var initialRoute = Routes.home.path;
|