-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
What package does this bug report belong to?
go_router (also go_router_builder, but theres a dedicated issue for that)
Dependency versions
pubspec.lock
packages:
...
go_router:
dependency: "direct main"
description:
name: go_router
sha256: abec47eb8c8c36ebf41d0a4c64dbbe7f956e39a012b3aafc530e951bdc12fe3f
url: "https://pub.dev"
source: hosted
version: "14.1.4"
...
When I want to use hash/fragment to contain a url or path (for, say, a file manager or to contain the url for any number of reasons) I have to manually place the # in the location of context.go('/some/path/#fragment')
This is workable, but If we have parameters for paths and query parameters, why cant I have the same thing for my fragments?
The main issue for me is that I prefer to use named routes for consistency. There's nowhere to put my fragment, but i can still use query parameters? why is this a worse experience?
Additionally, i have an issue for hash/fragment support in go_router_builder #139387, but this cant progress if go_router doesnt have proper explicit support for it built in.
Honestly, I don't see why it doesnt just use the first-party Uri class, which will support everything.
Code sample
I hate that my current solution is stuck at this:
final location = context.namedLocation('some_route'); // const nested records
// manually adding the fragment, hoping there arent any weird bugs surrounding it
context.replace('$location#https://a.url/that?i=mightuse');Also! why is there no feature request template for first-party packages?
I'm stuck butchering this bug report...