Milad-Akarie / auto_route_library

Flutter route generator
MIT License
1.51k stars 383 forks source link

auto_route fragment support #1980

Open TekExplorer opened 4 weeks ago

TekExplorer commented 4 weeks ago

I want to have certain routes use fragments to represent the current location, such as the current file being edited

I also use it for filters in some places, though I recognize that those could be query parameters.

Its also used for my login route, where a url needs to be inputted and then an api key on the next page. That Uri needs to be in the path, but urlEncoding it looks honestly terrible. Plus, its not a great api for the sake of deep links.

I dont really see fragments used at all, so i'm a little concerned.

If its not supported, what would it take to support it?

TekExplorer commented 4 weeks ago

It really doesn't look like it does support fragments... This is despite PageRouteInfo having the field already, so... I'm confused. Why is the field there if it isn't being used?

Milad-Akarie commented 3 weeks ago

@TekExplorer are you you saying you can't read #fragment from a url?

TekExplorer commented 2 weeks ago

@TekExplorer are you you saying you can't read #fragment from a url?

I'm saying I can't use it as a parameter In my route. This is important to me as the fragment is sometimes required, or otherwise has important semantic meaning.

Go router builder has the same issue if just not addressing the fragment at all, despite being otherwise trivial to implement.

TekExplorer commented 1 week ago

@Milad-Akarie What are your thoughts on the matter? Do you intend to properly support fragments for routes?