forked from deniscolak/smart-admin-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.dart
32 lines (28 loc) · 887 Bytes
/
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
import 'package:flutter/material.dart';
import 'package:smart_admin_dashboard/screens/login/login_screen.dart';
import 'package:smart_admin_dashboard/screens/home/home_screen.dart';
class Routes {
Routes._();
//static variables
static const String login = '/login';
static const String home = '/home';
static final routes = <String, WidgetBuilder>{
// splash: (BuildContext context) => SplashScreen(),
login: (BuildContext context) => Login(
title: '',
),
home: (BuildContext context) => HomeScreen(),
};
}
Route<dynamic> onGenerateRoute(RouteSettings settings) {
switch (settings.name) {
case "/":
return MaterialPageRoute(builder: (BuildContext context) {
return HomeScreen();
});
default:
return MaterialPageRoute(builder: (BuildContext context) {
return Login(title: "Hollo");
});
}
}