mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 02:17:54 +00:00
initialized Application theme
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'routing_constants.dart';
|
||||
|
||||
class RouteManager {
|
||||
List<String> routesWithoutLogin = [
|
||||
Routes.homeRoute,
|
||||
];
|
||||
|
||||
List<String> exclusionList = [];
|
||||
|
||||
//TODO (to mohammad) add the context extension
|
||||
routerManager({required String routeName, required BuildContext context}) {
|
||||
Navigator.of(context).pushNamed(routeName);
|
||||
}
|
||||
|
||||
routerManagerPushUntil(BuildContext? context, {required String routeName}) {
|
||||
if (context != null) {
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil(routeName, (route) => false);
|
||||
}
|
||||
}
|
||||
|
||||
routerManagerPopAndPushNamed(
|
||||
{required String routeName, required BuildContext context}) {
|
||||
Navigator.of(context).popAndPushNamed(routeName);
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
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 'package:syncrow_app/features/auth/view/auth_view.dart';
|
||||
import 'package:syncrow_app/features/home/view/home_view.dart';
|
||||
import 'package:syncrow_app/features/profile/view/profile_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_view.dart';
|
||||
import 'package:syncrow_app/features/smart/view/smart_view.dart';
|
||||
import 'package:syncrow_app/features/splash/view/splash_view.dart';
|
||||
|
||||
import 'routing_constants.dart';
|
||||
|
||||
@@ -17,15 +17,15 @@ class Router {
|
||||
|
||||
case Routes.homeRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const HomePage(), settings: settings);
|
||||
builder: (_) => const HomeView(), settings: settings);
|
||||
|
||||
case Routes.profileRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const ProfilePage(), settings: settings);
|
||||
builder: (_) => const ProfileView(), settings: settings);
|
||||
|
||||
case Routes.sceneRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const ScenePage(), settings: settings);
|
||||
builder: (_) => const SceneView(), settings: settings);
|
||||
|
||||
case Routes.smartRoute:
|
||||
return MaterialPageRoute(
|
||||
@@ -33,7 +33,7 @@ class Router {
|
||||
|
||||
case Routes.authRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const AuthPage(), settings: settings);
|
||||
builder: (_) => const AuthView(), settings: settings);
|
||||
|
||||
default:
|
||||
return MaterialPageRoute(
|
||||
|
||||
Reference in New Issue
Block a user