Messaging App Initial Commit

Pages Already Implemented Login and Registeration Page
This commit is contained in:
2025-01-01 00:35:25 +00:00
commit 8ec33980c6
14 changed files with 970 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
class NavigationService {
//
static NavigationService instance = NavigationService();
GlobalKey<NavigatorState>? navigatorKey;
NavigationService() {
navigatorKey = GlobalKey<NavigatorState>();
}
Future<dynamic>? navigateToReplacement(String _routeName) {
return navigatorKey!.currentState!.pushReplacementNamed(_routeName);
}
Future<dynamic>? navigateTo(String _routeName) {
return navigatorKey!.currentState!.pushNamed(_routeName);
}
Future<dynamic>? navigateToRoute(MaterialPageRoute _route) {
return navigatorKey!.currentState!.push(_route);
}
// Manually Call Function
goBack() {
return navigatorKey!.currentState!.pop();
}
}