Skip to content

Nested Navigators don't work correctly. #344

Description

@ianloic

In this example I have an outer navigator (in the FlutterApp) and an inner one (as a child of the scaffold).

If you press the "next" button instead of seeing the /1 page (which says "one") you still see the / "hello world" page. Then if you press back you get a stack:

android: I/sky     : ------------------------------------------------------------------------
android: I/sky     : Exception caught while building Focus-[GlobalObjectKey PageRoute(367453558)]
android: I/sky     : 'packages/flutter/src/widgets/framework.dart': Failed assertion: line 133: 'added' is not true.
android: I/sky     : Stack trace:
android: I/sky     : #0      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27)
android: I/sky     : #1      GlobalKey.registerRemoveListener (packages/flutter/src/widgets/framework.dart:133)
android: I/sky     : #2      FocusState._updateScopeRemovalListener (packages/flutter/src/widgets/focus.dart:206)
android: I/sky     : #3      FocusState._setFocusedScopeIfUnset (packages/flutter/src/widgets/focus.dart:189)
android: I/sky     : #4      _FocusScope._setFocusedScopeIfUnset (packages/flutter/src/widgets/focus.dart:45)
android: I/sky     : #5      Focus._atScope (packages/flutter/src/widgets/focus.dart:106)
android: I/sky     : #6      FocusState.build (packages/flutter/src/widgets/focus.dart:226)
android: I/sky     : #7      ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1050)
android: I/sky     : #8      BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:991)
android: I/sky     : #9      WidgetFlutterBinding.buildDirtyElements.<anonymous closure> (packages/flutter/src/widgets/binding.dart:55)
android: I/sky     : #10     BuildableElement.lockState (packages/flutter/src/widgets/framework.dart:924)
android: I/sky     : #11     WidgetFlutterBinding.buildDirtyElements (packages/flutter/src/widgets/binding.dart:50)
android: I/sky     : #12     WidgetFlutterBinding.beginFrame (packages/flutter/src/widgets/binding.dart:26)
android: I/sky     : #13     FlutterBinding._handlePersistentFrameCallback (packages/flutter/src/rendering/binding.dart:176)
android: I/sky     : #14     Scheduler.invokeCallback (packages/flutter/src/animation/scheduler.dart:81)
android: I/sky     : #15     Scheduler.beginFrame (packages/flutter/src/animation/scheduler.dart:67)
android: I/sky     : #16     _beginFrame (file:///src/flutter/engine/src/out/android_Release/gen/sky/bindings/Customhooks.dart:30)
android: I/sky     : ------------------------------------------------------------------------

[main-dart.txt](https://github.com/flutter/flutter/files/33382/main-dart.txt)

Activity

  1. abarth commented on Nov 13, 2015

    @abarth
    Contributor

    /cc @Hixie

  2. self-assigned this
    on Nov 17, 2015
  3. github-actions commented on Sep 2, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

customer: fuchsiaframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions