Open tedtop opened 3 years ago
Issue at auto_route_library: https://github.com/Milad-Akarie/auto_route_library/issues/257
I cannot reproduce this issues with latest stable Flutter. Is this maybe something caused by newer Flutter?
In the past, I resolved problems similar to this one by passing the AppRouter()
to the onGenerateRoute
field in the MaterialApp
. Could you try this?
Beyond that I am not sure I can do anything. I only use stable branch so I will probably wait until its fixed in the auto_route
package.
I’m on beta channel
I commented out that line 37 from auto_route
package:auto_route/src/extended_navigator.dart:37
I’m using beta for web compilation
On Fri, Nov 13, 2020 at 13:18 Vojtech Pavlovsky notifications@github.com wrote:
I cannot reproduce this issues with latest stable Flutter. Is this maybe something caused by newer Flutter?
In the past, I resolved problems similar to this one by passing the AppRouter() to the onGenerateRoute field in the MaterialApp. Could you try this?
Beyond that I am not sure I can do anything. I only use stable branch so I will probably wait until its fixed in the auto_route package.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vaetas/auto_route_example/issues/1#issuecomment-726985140, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHJUS2C645Q36B34N5R7NDSPWBBDANCNFSM4TUEF2JA .
On launch I get the red screen with this error:
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following NoSuchMethodError was thrown building Builder(dirty): flutter: The getter 'key' was called on null. flutter: Receiver: null flutter: Tried calling: key flutter: flutter: The relevant error-causing widget was: flutter: MaterialApp file:///Users/Ted/src/auto_route_example/lib/main.dart:14:14 flutter: flutter: When the exception was thrown, this was the stack: flutter: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) flutter: #1 ExtendedNavigator.builder. (package:auto_route/src/extended_navigator.dart:37:36)
flutter: #2 _MaterialAppState._materialBuilder. (package:flutter/src/material/app.dart:757:39)
flutter: #3 Builder.build (package:flutter/src/widgets/basic.dart:7185:48)
flutter: #4 StatelessElement.build (package:flutter/src/widgets/framework.dart:4749:28)
flutter: #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4675:15)
flutter: #6 Element.rebuild (package:flutter/src/widgets/framework.dart:4369:5)
flutter: #7 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4654:5)
flutter: #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4649:5)
flutter: ... Normal element mounting (258 frames)
flutter: #266 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3615:14)
flutter: #267 Element.updateChild (package:flutter/src/widgets/framework.dart:3380:18)
flutter: #268 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4700:16)
flutter: #269 _InheritedProviderScopeElement.performRebuild (package:provider/src/inherited_provider.dart:426:11)
flutter: #270 Element.rebuild (package:flutter/src/widgets/framework.dart:4369:5)
flutter: #271 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4654:5)
flutter: #272 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4649:5)
flutter: ... Normal element mounting (7 frames)
flutter: #279 SingleChildWidgetElementMixin.mount (package:nested/nested.dart:223:11)
flutter: ... Normal element mounting (7 frames)
flutter: #286 SingleChildWidgetElementMixin.mount (package:nested/nested.dart:223:11)
flutter: ... Normal element mounting (7 frames)
flutter: #293 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3615:14)
flutter: #294 Element.updateChild (package:flutter/src/widgets/framework.dart:3380:18)
flutter: #295 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1215:16)
flutter: #296 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1186:5)
flutter: #297 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:1128:18)
flutter: #298 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2730:19)
flutter: #299 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1127:13)
flutter: #300 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:967:7)
flutter: #301 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:948:7)
flutter: (elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
flutter:
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════