-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.dart
35 lines (30 loc) · 1.05 KB
/
routes.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import 'package:borku_africa_admin_web/dashboard_page.dart';
import 'package:flutter/material.dart';
import 'package:routemaster/routemaster.dart';
import 'login_page.dart';
import 'not_found_page.dart';
const String loginRoute = '/login';
const String dashboardRoute = '/dashboard';
const String overviewRoute = '/dashboard/overview';
const String settingsRoute = '/dashboard/settings';
const String notFoundRoute = '/404';
final routes = RouteMap(
onUnknownRoute: (route) {
return const MaterialPage(child: NotFoundPage());
},
routes: {
loginRoute: (route) => MaterialPage(
child: Title(
color: Colors.orange,
title: 'Login',
child: const LoginPage()
)
),
dashboardRoute: (route) => const TabPage(
child: DashboardPage(),
paths: [overviewRoute, settingsRoute],
),
overviewRoute: (route) => const MaterialPage(child: OverviewTab()),
settingsRoute: (route) => const MaterialPage(child: SettingsTab()),
}
);