mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
29 lines
723 B
Dart
29 lines
723 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'routing_constants.dart';
|
|
|
|
class RouteManager {
|
|
List<String> routesWithoutLogin = [
|
|
RouteConstants.homeRoute,
|
|
];
|
|
|
|
List<String> exclusionList = [];
|
|
|
|
routerManager({required String routeName, required BuildContext context}) {
|
|
Navigator.of(context).pushNamed(routeName);
|
|
}
|
|
|
|
routerManagerPushUntil(
|
|
{required String routeName, required BuildContext? context}) {
|
|
if (context != null) {
|
|
Navigator.of(context)
|
|
.pushNamedAndRemoveUntil(routeName, (route) => false);
|
|
}
|
|
}
|
|
|
|
routerManagerPopAndPushNamed(
|
|
{required String routeName, required BuildContext context}) {
|
|
Navigator.of(context).popAndPushNamed(routeName);
|
|
}
|
|
}
|