-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A GlobalKey was used multiple times inside one widget's child list ERROR #295
Comments
I think I had this problem too. My problem was solved after I replaced "initialRoute" with "home" in the class MaterialApp |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you still think this issue is needed, reopen it again. |
I encountered the same issue while implementing deep linking. The deep link works normally when the app is open, but if the app is closed, an error occurs when clicking on the link to open the app. It displays the error: 'A GlobalKey was used multiple times inside one widget's child list.'" Let me know if you need further assistance! Here is my code : import 'dart:io'; import 'package:device_preview/device_preview.dart'; void main() async { await RESTExecutor.initialize(config, domains); if (Platform.isAndroid) { FirebaseNotificationsService().setUpFirebase(); FirebaseMessaging.onBackgroundMessage( FirebaseMessaging.instance.subscribeToTopic("general"); FlutterError.onError = (errorDetails) { PlatformDispatcher.instance.onError = (error, stack) { runApp( final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = class MyApp extends StatefulWidget { @OverRide class _MyAppState extends State { void handleNotificationTap(RemoteMessage message) { @OverRide bool isTablet(BuildContext context) { |
I encountered the same error using deeplinks. When app is closed before scanning, link breaks. I fixed it by adding a base route to my list of routes: "/" |
I encoutered the same error when I try to open the app by clicking on a Push Notification: import 'dart:io'; import 'package:firebase_core/firebase_core.dart'; void main() async { final GlobalKey navigatorKey = GlobalKey(); Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { class MainApp extends StatelessWidget { @OverRide void setupFlutterNotifications() async { const DarwinInitializationSettings initializationSettingsIOS = const InitializationSettings initializationSettings = InitializationSettings( await flutterLocalNotificationsPlugin.initialize( void showFlutterNotification(RemoteMessage message) { const NotificationDetails platformChannelSpecifics = NotificationDetails( flutterLocalNotificationsPlugin.show( void verifyAuthenticationAndHandleNotification(BuildContext context) async { final initialMessage = await FirebaseMessaging.instance.getInitialMessage(); FirebaseMessaging.onMessage.listen((RemoteMessage message) { FirebaseMessaging.onMessageOpenedApp.listen((message) { Future.delayed( void handleNotification(dynamic message) { |
"Defining the unknownRoute in MaterialApp can solve my problem." |
"Defining the unknownRoute in MaterialApp can solve my problem." Let me know if you'd like further explanation or adjustments! |
Hi, once I insert credentials for login, on redirecting way back to the app, I get this error. I am using the GetX package for routing and as a wrapper for my root app.
root app
in a separate file, I have the config for authorization.
an then in GetxController I have logic for login, logout...
The text was updated successfully, but these errors were encountered: