jonataslaw / getx

Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
MIT License
10.39k stars 1.63k forks source link

Exception: GetRoot is not part of the three 【get: ^5.0.0-release-candidate-8】 #3174

Closed zhao004 closed 3 months ago

zhao004 commented 3 months ago

example:

    return GetMaterialApp(
      title: "example",
      builder: FToastBuilder(),
      navigatorKey: Get.key,
      initialRoute: AppPages.initial,
      getPages: AppPages.routes,
      localizationsDelegates: const [
        GlobalMaterialLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: const [Locale("en"), Locale("zh")],
    );

Version used:

Flutter 3.22.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0850beeb2 (4 weeks ago) • 2024-07-16 21:43:41 -0700
Engine • revision 235db911ba
Tools • Dart 3.4.4 • DevTools 2.34.3
get: ^5.0.0-release-candidate-8
jonataslaw commented 3 months ago

Thanks for opening this issue.

What are you using in your main?

Something is looking for GetRoot before GetMaterialApp

zhao004 commented 3 months ago

// navigatorKey: Get.key, I commented out this code and no more errors.

jonataslaw commented 3 months ago

We no longer use this, I need to remove it from the documentation. I'm glad you managed to resolve this!

If you have any other problems, don't hesitate to open an issue.