mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00

initialized Login UI initialized Home(no Devices) UI Added Colors (from syncrow website) Added Logo
47 lines
1.5 KiB
Dart
47 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_app/features/auth/auth_view.dart';
|
|
import 'package:syncrow_app/features/home/home_view.dart';
|
|
import 'package:syncrow_app/features/profile/profile_view.dart';
|
|
import 'package:syncrow_app/features/scene/scene_view.dart';
|
|
import 'package:syncrow_app/features/smart/smart_view.dart';
|
|
import 'package:syncrow_app/features/splash/splash_view.dart';
|
|
|
|
import 'routing_constants.dart';
|
|
|
|
class Router {
|
|
static Route<dynamic> generateRoute(RouteSettings settings) {
|
|
switch (settings.name) {
|
|
case Routes.splash:
|
|
return MaterialPageRoute(
|
|
builder: (_) => const SplashView(), settings: settings);
|
|
|
|
case Routes.homeRoute:
|
|
return MaterialPageRoute(
|
|
builder: (_) => const HomePage(), settings: settings);
|
|
|
|
case Routes.profileRoute:
|
|
return MaterialPageRoute(
|
|
builder: (_) => const ProfilePage(), settings: settings);
|
|
|
|
case Routes.sceneRoute:
|
|
return MaterialPageRoute(
|
|
builder: (_) => const ScenePage(), settings: settings);
|
|
|
|
case Routes.smartRoute:
|
|
return MaterialPageRoute(
|
|
builder: (_) => const SmartPage(), settings: settings);
|
|
|
|
case Routes.authRoute:
|
|
return MaterialPageRoute(
|
|
builder: (_) => const AuthPage(), settings: settings);
|
|
|
|
default:
|
|
return MaterialPageRoute(
|
|
builder: (_) => Scaffold(
|
|
body: Center(child: Text('No route defined for ${settings.name}')),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
}
|