New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web] Expose PlatformLocation and HashUrlStrategy through ui_web #41163
Conversation
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Looks great!
lib/web_ui/lib/ui_web/src/ui_web/navigation/platform_location.dart
Outdated
Show resolved
Hide resolved
abstract class UrlStrategy { | ||
/// Abstract const constructor. This constructor enables subclasses to provide | ||
/// const constructors so that they can be used in const expressions. | ||
const UrlStrategy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. All methods are abstract, which tells me this class can be implemented. So we don't need a constructor. The implementation can still be const.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! I changed PlatformLocation
to be an abstract interface
(TIL about interfaces in Dart!).
That said, I can't make UrlStrategy
an interface yet because it's being extended in flutter_web_plugins
. I'll need to change that to implements
first then come back and make UrlStrategy
an interface. I'll do it in a follow up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto label is removed for flutter/engine, pr: 41163, due to - The status or check suite Mac mac_host_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…126486) flutter/engine@ef771f9...a0925f1 2023-05-10 mdebbar@google.com [web] Expose PlatformLocation and HashUrlStrategy through ui_web (flutter/engine#41163) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC aaclarke@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#126486) flutter/engine@ef771f9...a0925f1 2023-05-10 mdebbar@google.com [web] Expose PlatformLocation and HashUrlStrategy through ui_web (flutter/engine#41163) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC aaclarke@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
PlatformLocation
and its subclassBrowserPlatformLocation
through the newui_web
.HashUrlStrategy
too. It's useful for users who want to extend and customize it instead of building their own from scratch.ui_web/url_strategy.dart
=>ui_web/navigation/url_strategy.dart
.Issue: flutter/flutter#126831