title: Error when using own flutter package in Flutter project. Both with GetX
body: <p>Hello. I've a flutter package using GetX and when used in another project with GetX, received many generic errors in debug console.
  THe principal error, is <code>The relevant error-causing widget was GetMaterialApp </code></p>
  <ol>
  <li><p>Have problem use two GetMaterialApp in same project? (Standalone flutter project And package)</p>
  </li>
  <li><p>I'm a newbie in a flutter, but I have difficulty understanding these generic errors.</p>
  </li>
  </ol>
  <p>The Package call:</p>
  <pre><code> Widget build(BuildContext context) {
      return ParkingModuleWidget(
          loginCallback: () async =&gt; &quot;dsds&quot;,
          baseUrl: &quot;URL&quot;,
          tenantId: &quot;TENANTID&quot;,
          authToken: &quot;TOKEN&quot;);
    }
  </code></pre>
  <p>The use GetMaterialApp in <em><strong>Package</strong></em></p>
  <pre><code>return GestureDetector(
        onTap: () {
          final focus = FocusManager.instance.primaryFocus;
          if (focus?.hasPrimaryFocus == true) {
            focus?.unfocus();
          }
        },
        child: GetMaterialApp(
          debugShowCheckedModeBanner: false,
          title: '',
          locale: Locale(&quot;pt&quot;, &quot;BR&quot;),
          localizationsDelegates: AppLocalizations.localizationsDelegates,
          supportedLocales: AppLocalizations.supportedLocales,
          navigatorObservers: [
            SentryNavigatorObserver(),
          ],
          initialBinding: CoreBinding(_config),
          initialRoute: AppPages.setup,
          getPages: AppPages.pages,
        ),
      );
    }
  </code></pre>
  <p>The use GetMaterialApp in <strong>PROJECT</strong></p>
  <pre><code>Widget build(BuildContext context) {
      return FlavorBanner(
        location: BannerLocation.topEnd,
        child: GetMaterialApp(
            title: 'JCPM'.tr,
            theme: appTheme(context),
            initialRoute: initialRoute,
            initialBinding: InitialBinding(),
            getPages: AppRoutes.pages,
            debugShowCheckedModeBanner: false,
            defaultTransition: Transition.cupertino,
            localizationsDelegates: const [
              GlobalMaterialLocalizations.delegate,
              GlobalWidgetsLocalizations.delegate,
              GlobalCupertinoLocalizations.delegate,
            ],
            locale: const Locale('pt', 'BR'),
            fallbackLocale: const Locale('pt', 'BR'),
            translations: AppTranslations(),
            supportedLocales: const [
              Locale('pt', 'BR'),
              Locale('en'),
            ]).dismissKeyboard(context),
      );
    }
  </code></pre>
  <p><strong>LOG</strong></p>
  <pre><code>════════ Exception caught by widgets library ═══════════════════════════════════
  The following assertion was thrown building Directionality(textDirection: ltr):
  'package:flutter/src/widgets/framework.dart': Failed assertion: line 1900 pos 12: 'element._lifecycleState == _ElementLifecycle.active': is not true.
  
  Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
  In either case, please report this assertion by filing a bug on GitHub:
    https://github.com/flutter/flutter/issues/new?template=2_bug.md
  
  The relevant error-causing widget was
  GetMaterialApp
  When the exception was thrown, this was the stack
  #2      _InactiveElements._deactivateRecursively
  #3      ComponentElement.visitChildren
  #4      _InactiveElements._deactivateRecursively
  #5      ComponentElement.visitChildren
  #6      _InactiveElements._deactivateRecursively
  #7      ComponentElement.visitChildren
  #8      _InactiveElements._deactivateRecursively
  #9      ComponentElement.visitChildren
  #10     _InactiveElements._deactivateRecursively
  #11     MultiChildRenderObjectElement.visitChildren
  #12     _InactiveElements._deactivateRecursively
  #13     ComponentElement.visitChildren
  #14     _InactiveElements._deactivateRecursively
  #15     ComponentElement.visitChildren
  #16     _InactiveElements._deactivateRecursively
  #17     ComponentElement.visitChildren
  #18     _InactiveElements._deactivateRecursively
  #19     SingleChildRenderObjectElement.visitChildren
  #20     _InactiveElements._deactivateRecursively
  #21     ComponentElement.visitChildren
  #22     _InactiveElements._deactivateRecursively
  #23     SingleChildRenderObjectElement.visitChildren
  #24     _InactiveElements._deactivateRecursively
  #25     ComponentElement.visitChildren
  #26     _InactiveElements._deactivateRecursively
  #27     ComponentElement.visitChildren
  #28     _InactiveElements._deactivateRecursively
  #29     ComponentElement.visitChildren
  #30     _InactiveElements._deactivateRecursively
  #31     ComponentElement.visitChildren
  #32     _InactiveElements._deactivateRecursively
  #33     ComponentElement.visitChildren
  #34     _InactiveElements._deactivateRecursively
  #35     ComponentElement.visitChildren
  #36     _InactiveElements._deactivateRecursively
  #37     ComponentElement.visitChildren
  #38     _InactiveElements._deactivateRecursively
  #39     ComponentElement.visitChildren
  #40     _InactiveElements._deactivateRecursively
  #41     SingleChildRenderObjectElement.visitChildren
  #42     _InactiveElements._deactivateRecursively
  #43     ComponentElement.visitChildren
  #44     _InactiveElements._deactivateRecursively
  #45     SingleChildRenderObjectElement.visitChildren
  #46     _InactiveElements._deactivateRecursively
  #47     SingleChildRenderObjectElement.visitChildren
  #48     _InactiveElements._deactivateRecursively
  #49     ComponentElement.visitChildren
  #50     _InactiveElements._deactivateRecursively
  #51     MultiChildRenderObjectElement.visitChildren
  #52     _InactiveElements._deactivateRecursively
  #53     ComponentElement.visitChildren
  #54     _InactiveElements._deactivateRecursively
  #55     SingleChildRenderObjectElement.visitChildren
  #56     _InactiveElements._deactivateRecursively
  #57     ComponentElement.visitChildren
  #58     _InactiveElements._deactivateRecursively
  #59     SingleChildRenderObjectElement.visitChildren
  #60     _InactiveElements._deactivateRecursively
  #61     ComponentElement.visitChildren
  #62     _InactiveElements._deactivateRecursively
  #63     SingleChildRenderObjectElement.visitChildren
  #64     _InactiveElements._deactivateRecursively
  #65     ComponentElement.visitChildren
  #66     _InactiveElements._deactivateRecursively
  #67     ComponentElement.visitChildren
  #68     _InactiveElements._deactivateRecursively
  #69     ComponentElement.visitChildren
  #70     _InactiveElements._deactivateRecursively
  #71     SingleChildRenderObjectElement.visitChildren
  #72     _InactiveElements._deactivateRecursively
  #73     SingleChildRenderObjectElement.visitChildren
  #74     _InactiveElements._deactivateRecursively
  #75     ComponentElement.visitChildren
  #76     _InactiveElements._deactivateRecursively
  #77     SingleChildRenderObjectElement.visitChildren
  #78     _InactiveElements._deactivateRecursively
  #79     ComponentElement.visitChildren
  #80     _InactiveElements._deactivateRecursively
  #81     ComponentElement.visitChildren
  #82     _InactiveElements._deactivateRecursively
  #83     ComponentElement.visitChildren
  #84     _InactiveElements._deactivateRecursively
  #85     ComponentElement.visitChildren
  #86     _InactiveElements._deactivateRecursively
  #87     ComponentElement.visitChildren
  #88     _InactiveElements._deactivateRecursively
  #89     ComponentElement.visitChildren
  #90     _InactiveElements._deactivateRecursively
  #91     SingleChildRenderObjectElement.visitChildren
  #92     _InactiveElements._deactivateRecursively
  #93     ComponentElement.visitChildren
  #94     _InactiveElements._deactivateRecursively
  #95     ComponentElement.visitChildren
  #96     _InactiveElements._deactivateRecursively
  #97     ComponentElement.visitChildren
  #98     _InactiveElements._deactivateRecursively
  #99     ComponentElement.visitChildren
  #100    _InactiveElements._deactivateRecursively
  #101    ComponentElement.visitChildren
  #102    _InactiveElements._deactivateRecursively
  #103    SingleChildRenderObjectElement.visitChildren
  #104    _InactiveElements._deactivateRecursively
  #105    ComponentElement.visitChildren
  #106    _InactiveElements._deactivateRecursively
  #107    ComponentElement.visitChildren
  #108    _InactiveElements._deactivateRecursively
  #109    ComponentElement.visitChildren
  #110    _InactiveElements._deactivateRecursively
  #111    MultiChildRenderObjectElement.visitChildren
  #112    _InactiveElements._deactivateRecursively
  #113    ComponentElement.visitChildren
  #114    _InactiveElements._deactivateRecursively
  #115    ComponentElement.visitChildren
  #116    _InactiveElements._deactivateRecursively
  #117    ComponentElement.visitChildren
  #118    _InactiveElements._deactivateRecursively
  #119    SingleChildRenderObjectElement.visitChildren
  #120    _InactiveElements._deactivateRecursively
  #121    ComponentElement.visitChildren
  #122    _InactiveElements._deactivateRecursively
  #123    SingleChildRenderObjectElement.visitChildren
  #124    _InactiveElements._deactivateRecursively
  #125    SingleChildRenderObjectElement.visitChildren
  #126    _InactiveElements._deactivateRecursively
  #127    ComponentElement.visitChildren
  #128    _InactiveElements._deactivateRecursively
  #129    ComponentElement.visitChildren
  #130    _InactiveElements._deactivateRecursively
  #131    _InactiveElements.add
  #132    Element.deactivateChild
  #133    Element._retakeInactiveElement
  ...     Normal element mounting (369 frames)
  #502    Element.inflateWidget
  #503    Element.updateChild
  #504    ComponentElement.performRebuild
  #505    StatefulElement.performRebuild
  #506    Element.rebuild
  #507    BuildOwner.buildScope
  #508    WidgetsBinding.drawFrame
  #509    RendererBinding._handlePersistentFrameCallback
  #510    SchedulerBinding._invokeFrameCallback
  #511    SchedulerBinding.handleDrawFrame
  #512    SchedulerBinding._handleDrawFrame
  #516    _invoke (dart:ui/hooks.dart:166:10)
  #517    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5)
  #518    _drawFrame (dart:ui/hooks.dart:129:31)
  (elided 5 frames from class _AssertionError and dart:async)
  ════════════════════════════════════════════════════════════════════════════════
  I/m.jcpm.app.pro(18218): Background young concurrent copying GC freed 52655(2313KB) AllocSpace objects, 17(828KB) LOS objects, 52% free, 2926KB/6191KB, paused 5.474ms total 28.182ms
  
  ════════ Exception caught by scheduler library ═════════════════════════════════
  Tried to build dirty widget in the wrong build scope.
  ════════════════════════════════════════════════════════════════════════════════
  
  ════════ Exception caught by widgets library ═══════════════════════════════════
  Duplicate GlobalKey detected in widget tree.
  ════════════════════════════════════════════════════════════════════════════════
  </code></pre>