fixed auth pages sizes and push notification navigate bug

This commit is contained in:
amirrezaghabeli
2025-09-24 13:11:48 +03:30
parent a8e65f3cb5
commit 8458da4f15
10 changed files with 372 additions and 360 deletions
+17 -12
View File
@@ -54,21 +54,26 @@ class MyApp extends StatefulWidget {
}
class _MyAppState extends State<MyApp> {
Future<void> setupInteractedMessage() async {
final initialMessage = await FirebaseMessaging.instance.getInitialMessage();
if (initialMessage != null) {
_handleMessage(initialMessage);
}
FirebaseMessaging.onMessageOpenedApp.listen(_handleMessage);
}
void _handleMessage(RemoteMessage message) {
appRouter.go(
const SplashScreenRoute(navigateToNotification: true).location,
);
}
@override
void initState() {
super.initState();
_handleInitialMessage();
}
Future<void> _handleInitialMessage() async {
final message = await FirebaseMessaging.instance.getInitialMessage();
if (message != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
appRouter.go(
const SplashScreenRoute(navigateToNotification: true).location,
);
});
}
setupInteractedMessage();
}
@override