stacked icon indicating copy to clipboard operation
stacked copied to clipboard

[bug]: Fix deprecations: RouteInformation.location

Open Pebkac03 opened this issue 1 year ago • 1 comments

Describe the bug

Seeing renovate failing Flutter analyze with two warnings led me to discover the use of the deprecated RouteInformation.location as well as an non-deprecated override of WidgetsBindingObserver.didPushRoute(). I believe we should fix this with the goal of accomplishing the following:

  1. Prevent flutter analyze from blocking renovate's PR:s
  2. Move on from deprecated methods/properties ahead of removal.
  3. Enable Stacked to make use of the benefits and fixes connected to the move from location to uri.

I suggest the following requirements.

  • [ ] Change all private uses of the location paramter to use the uri parameter.
  • [ ] Deprecate the location parameter in all public methods that has it.
  • [ ] Add uri parameter to all public methods with a location parameter with an either or assert as well as logic to handle both cases.
  • [ ] Deprecate the didPushRoute() @​override in StackedRouteInformationProvider

What operating system do you use?

Windows

Information about the installed tooling

No response

Steps to reproduce the issue

  1. Fork repo
  2. Run: flutter analyze

Expected behavior

flutter analyze not giving any warnings

Screenshots

No response

Additional Context

Unsure if this should be reported as a feature or bug. I've started working on a PR (link here shortly). For more context check out this PR where location was deprecated (and also mentions it being made non-nullable): flutter/flutter#119968

Pebkac03 avatar Dec 10 '24 20:12 Pebkac03

Much appreciated @Pebkac03 , I've taken the shortcut on this matter and disabled analyze as a failure step in the workflow.

The main reason being we just need the tests to pass in order for us to feel confident that the package works as expected.

We can still fix the deprecation issues soon.

FilledStacks avatar Dec 12 '24 07:12 FilledStacks