samples
samples copied to clipboard
game_template has navigation error
After pressing the AppBar's Back button from the level screen, the following logs appear:
SEVERE: 2022-05-28 10:54:16.715: GoRouter: Exception during GoRouter navigation
SEVERE: 2022-05-28 10:54:16.715: GoRouter: Exception during GoRouter navigation
And the screen looks like this:
In my case, the AppBar is already disabled and hidden from view in the template. I'm unable to trigger the error.

I can repro this on web (doesn't repro on mobile).
Steps:
- Navigate to a level and win.
- Wait for confetti animation to end and press "continue".
- Try to navigate back.
- Observe error.
On mobile, step 3 leads back to the initial app screen.
Stack trace:
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following TypeErrorImpl was thrown building Builder(dependencies:
[_InheritedProviderScope<Palette?>]):
Unexpected null value.
The relevant error-causing widget was:
Builder
ub.dev/go_router-7.1.1/lib/src/builder.dart:93:7
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 288:49 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 606:63 nullCheck
packages/game_template/main.dart 161:46 <fn>
packages/go_router/src/builder.dart 354:25 [_buildPageForGoRoute]
packages/go_router/src/builder.dart 212:14 [_buildRecursive]
packages/go_router/src/builder.dart 220:7 [_buildRecursive]
packages/go_router/src/builder.dart 220:7 [_buildRecursive]
packages/go_router/src/builder.dart 153:7 [_buildPages]
packages/go_router/src/builder.dart 132:9 tryBuild
packages/go_router/src/builder.dart 98:35 <fn>
packages/flutter/src/widgets/basic.dart 7531:48 build
packages/flutter/src/widgets/framework.dart 5156:22 build
packages/flutter/src/widgets/framework.dart 5086:15 performRebuild
packages/flutter/src/widgets/framework.dart 4805:7 rebuild
packages/flutter/src/widgets/framework.dart 5162:5 update
packages/flutter/src/widgets/framework.dart 3686:14 updateChild
packages/flutter/src/widgets/framework.dart 5111:16 performRebuild
packages/flutter/src/widgets/framework.dart 4805:7 rebuild
packages/flutter/src/widgets/framework.dart 5417:5 update
packages/flutter/src/widgets/inherited_notifier.dart 107:11 update
packages/flutter/src/widgets/framework.dart 3686:14 updateChild
packages/flutter/src/widgets/framework.dart 5111:16 performRebuild
packages/flutter/src/widgets/framework.dart 4805:7 rebuild
packages/flutter/src/widgets/framework.dart 5162:5 update
packages/flutter/src/widgets/framework.dart 3686:14 updateChild
packages/flutter/src/widgets/framework.dart 5111:16 performRebuild
packages/flutter/src/widgets/framework.dart 4805:7 rebuild
packages/flutter/src/widgets/framework.dart 5417:5 update
packages/flutter/src/widgets/framework.dart 3686:14 updateChild
packages/flutter/src/widgets/framework.dart 5111:16 performRebuild
packages/flutter/src/widgets/framework.dart 4805:7 rebuild
packages/flutter/src/widgets/framework.dart 5417:5 update
packages/flutter/src/widgets/framework.dart 3686:14 updateChild
packages/flutter/src/widgets/framework.dart 5111:16 performRebuild
packages/flutter/src/widgets/framework.dart 5251:11 performRebuild
packages/flutter/src/widgets/framework.dart 4805:7 rebuild
packages/flutter/src/widgets/framework.dart 2780:18 buildScope
packages/flutter/src/widgets/binding.dart 903:9 drawFrame
packages/flutter/src/rendering/binding.dart 358:5 [_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart 1284:15 [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1214:9 handleDrawFrame
packages/flutter/src/scheduler/binding.dart 1072:5 [_handleDrawFrame]
dart-sdk/lib/async/zone.dart 1399:13 _rootRun
dart-sdk/lib/async/zone.dart 1301:19 run
dart-sdk/lib/async/zone.dart 1209:7 runGuarded
lib/_engine/engine/platform_dispatcher.dart 1238:9 invoke
lib/_engine/engine/platform_dispatcher.dart 244:5 invokeOnDrawFrame
lib/_engine/engine/initialization.dart 190:45 <fn>
PTAL @filiph
Just confirming I'm on this. Thanks for your patience!