save before flutter upgrade

This commit is contained in:
Abraham
2025-07-15 16:40:14 -07:00
commit 813c586a1c
197 changed files with 11144 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
class NavigationService {
static GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
static navigateTo(String routeName) async {
return await navigatorKey.currentState!.pushNamed(routeName);
}
static replaceTo(String routeName) async {
return await navigatorKey.currentState!.pushReplacementNamed(routeName);
}
static removeTo(String newRoute) async {
return await navigatorKey.currentState!
.pushNamedAndRemoveUntil(newRoute, (_) => false);
}
}