Skip to content

go_router should allow setting requestFocus on navigator. #129581

@jezell

Description

@jezell

Is there an existing issue for this?

Use case

We are building an app that redirects to keep a muliselect textbox in sync with the URL. This is like in iMessage where you can enter names in a to box and the feed is rendered below. GoRouter is stealing focus every time we redirect. Navigator has a requestFocus property which can be used to disable this, but there is no way too hook into the navigator creation in go_router.

Proposal

Add a requestFocus property to GoRouter which is passed to the Navigator constructor in _buildNavigator. We have verified by forking that setting this property to false solves the problem.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: go_routerThe go_router packagepackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions