We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have been trying to use the code, but getting an error of Modular.navigatorKey.
The following is the output of debug console.
Launching lib/main.dart on Android SDK built for x86 in debug mode... ✓ Built build/app/outputs/flutter-apk/app-debug.apk. D/EGL_emulation(21191): eglMakeCurrent: 0xdff53200: ver 3 0 (tinfo 0xdff3a490) I/Choreographer(21191): Skipped 33 frames! The application may be doing too much work on its main thread. D/EGL_emulation(21191): eglMakeCurrent: 0xd7e1baa0: ver 3 0 (tinfo 0xd7ef6290) I/flutter (21191): -- AppModule INITIALIZED I/flutter (21191): -- LoginModule INITIALIZED I/flutter (21191): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (21191): The following assertion was thrown building IconTheme(color: Color(0xdd000000)): I/flutter (21191): Add Modular.navigatorKey in your MaterialApp; I/flutter (21191): I/flutter (21191): return MaterialApp( I/flutter (21191): navigatorKey: Modular.navigatorKey, I/flutter (21191): ... I/flutter (21191): I/flutter (21191): . I/flutter (21191): 'package:flutter_modular/src/modular_base.dart': I/flutter (21191): Failed assertion: line 35 pos 9: '_navigatorKey != null' I/flutter (21191): I/flutter (21191): The relevant error-causing widget was: �[38;5;248mI/flutter (21191): MaterialApp�[39;49m I/flutter (21191): I/flutter (21191): When the exception was thrown, this was the stack: �[38;5;248mI/flutter (21191): #2 Modular.link�[39;49m �[38;5;248mI/flutter (21191): #3 Modular.generateRoute�[39;49m �[38;5;244mI/flutter (21191): #4 _WidgetsAppState._onGenerateRoute�[39;49m �[38;5;244mI/flutter (21191): #5 NavigatorState._routeNamed�[39;49m �[38;5;244mI/flutter (21191): #6 Navigator.defaultGenerateInitialRoutes�[39;49m �[38;5;244mI/flutter (21191): #7 NavigatorState.initState�[39;49m �[38;5;244mI/flutter (21191): #8 StatefulElement._firstBuild�[39;49m �[38;5;244mI/flutter (21191): #9 ComponentElement.mount�[39;49m I/flutter (21191): ... Normal element mounting (93 frames) �[38;5;244mI/flutter (21191): #102 Element.inflateWidget�[39;49m �[38;5;244mI/flutter (21191): #103 Element.updateChild�[39;49m �[38;5;244mI/flutter (21191): #104 ComponentElement.performRebuild�[39;49m �[38;5;244mI/flutter (21191): #105 StatefulElement.performRebuild�[39;49m �[38;5;244mI/flutter (21191): #106 Element.rebuild�[39;49m �[38;5;244mI/flutter (21191): #107 BuildOwner.buildScope�[39;49m �[38;5;244mI/flutter (21191): #108 WidgetsBinding.drawFrame�[39;49m �[38;5;244mI/flutter (21191): #109 RendererBinding._handlePersistentFrameCallback�[39;49m �[38;5;244mI/flutter (21191): #110 SchedulerBinding._invokeFrameCallback�[39;49m �[38;5;244mI/flutter (21191): #111 SchedulerBinding.handleDrawFrame�[39;49m �[38;5;244mI/flutter (21191): #112 SchedulerBinding.scheduleWarmUpFrame.�[39;49m I/flutter (21191): (elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch) I/flutter (21191): I/flutter (21191): ════════════════════════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have been trying to use the code, but getting an error of Modular.navigatorKey.
![Screenshot_1590533285](https://user-images.githubusercontent.com/306154/82957706-4d2d0a00-9fd1-11ea-8ce2-2d8dca2708b9.png)
The following is the output of debug console.
Launching lib/main.dart on Android SDK built for x86 in debug mode...
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
D/EGL_emulation(21191): eglMakeCurrent: 0xdff53200: ver 3 0 (tinfo 0xdff3a490)
I/Choreographer(21191): Skipped 33 frames! The application may be doing too much work on its main thread.
D/EGL_emulation(21191): eglMakeCurrent: 0xd7e1baa0: ver 3 0 (tinfo 0xd7ef6290)
I/flutter (21191): -- AppModule INITIALIZED
I/flutter (21191): -- LoginModule INITIALIZED
I/flutter (21191): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (21191): The following assertion was thrown building IconTheme(color: Color(0xdd000000)):
I/flutter (21191): Add Modular.navigatorKey in your MaterialApp;
I/flutter (21191):
I/flutter (21191): return MaterialApp(
I/flutter (21191): navigatorKey: Modular.navigatorKey,
I/flutter (21191): ...
I/flutter (21191):
I/flutter (21191): .
I/flutter (21191): 'package:flutter_modular/src/modular_base.dart':
I/flutter (21191): Failed assertion: line 35 pos 9: '_navigatorKey != null'
I/flutter (21191):
I/flutter (21191): The relevant error-causing widget was:
�[38;5;248mI/flutter (21191): MaterialApp�[39;49m
I/flutter (21191):
I/flutter (21191): When the exception was thrown, this was the stack:
�[38;5;248mI/flutter (21191): #2 Modular.link�[39;49m
�[38;5;248mI/flutter (21191): #3 Modular.generateRoute�[39;49m
�[38;5;244mI/flutter (21191): #4 _WidgetsAppState._onGenerateRoute�[39;49m
�[38;5;244mI/flutter (21191): #5 NavigatorState._routeNamed�[39;49m
�[38;5;244mI/flutter (21191): #6 Navigator.defaultGenerateInitialRoutes�[39;49m
�[38;5;244mI/flutter (21191): #7 NavigatorState.initState�[39;49m
�[38;5;244mI/flutter (21191): #8 StatefulElement._firstBuild�[39;49m
�[38;5;244mI/flutter (21191): #9 ComponentElement.mount�[39;49m
I/flutter (21191): ... Normal element mounting (93 frames)
�[38;5;244mI/flutter (21191): #102 Element.inflateWidget�[39;49m
�[38;5;244mI/flutter (21191): #103 Element.updateChild�[39;49m
�[38;5;244mI/flutter (21191): #104 ComponentElement.performRebuild�[39;49m
�[38;5;244mI/flutter (21191): #105 StatefulElement.performRebuild�[39;49m
�[38;5;244mI/flutter (21191): #106 Element.rebuild�[39;49m
�[38;5;244mI/flutter (21191): #107 BuildOwner.buildScope�[39;49m
�[38;5;244mI/flutter (21191): #108 WidgetsBinding.drawFrame�[39;49m
�[38;5;244mI/flutter (21191): #109 RendererBinding._handlePersistentFrameCallback�[39;49m
�[38;5;244mI/flutter (21191): #110 SchedulerBinding._invokeFrameCallback�[39;49m
�[38;5;244mI/flutter (21191): #111 SchedulerBinding.handleDrawFrame�[39;49m
�[38;5;244mI/flutter (21191): #112 SchedulerBinding.scheduleWarmUpFrame.�[39;49m
I/flutter (21191): (elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
I/flutter (21191):
I/flutter (21191): ════════════════════════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered: