Conversation
html 0.15.7 removed the top-level `matches(Element, String)` from
`lib/src/query_selector.dart`, keeping only `SelectorEvaluator.matches`.
`StyledElement.matches` called the removed function, so flutter_html no
longer compiles against html 0.15.7:
Error: Method not found: 'matches'.
package:html/src/query_selector.dart
The declared constraint is `html: ^0.15.5`, so pub resolves 0.15.7 by
default and any downstream project picks up the break on its next
`pub upgrade`. The only workaround available today is a dependency
override pinning html to 0.15.6.
This parses the selector with csslib — already a direct dependency — and
matches with `SelectorEvaluator`, which is present and unchanged across
html 0.15.x. That makes it work on either side of the removal, so it needs
no constraint bump.
This is the TODO immediately above the import coming true; the
implementation import stays, since SelectorEvaluator is only reachable
through it.
Verified against the package's own suite:
html 0.15.6, before this change: 232 passed, 1 failed
html 0.15.7, before this change: 13 passed, 11 failed
html 0.15.6, after this change: 232 passed, 1 failed
html 0.15.7, after this change: 232 passed, 1 failed
The single remaining failure (whitespace_test.dart, details/summary
newlines) is pre-existing on master and unrelated.
ruddin-ncl
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
html 0.15.7 removed the top-level
matches(Element, String)fromlib/src/query_selector.dart, keeping onlySelectorEvaluator.matches.StyledElement.matchescalled the removed function, so flutter_html no longer compiles against html 0.15.7:The declared constraint is
html: ^0.15.5, so pub resolves 0.15.7 by default and any downstream project picks up the break on its nextpub upgrade. The only workaround available today is a dependency override pinning html to 0.15.6.This parses the selector with csslib — already a direct dependency — and matches with
SelectorEvaluator, which is present and unchanged across html 0.15.x. That makes it work on either side of the removal, so it needs no constraint bump.This is the TODO immediately above the import coming true; the implementation import stays, since SelectorEvaluator is only reachable through it.
Verified against the package's own suite:
The single remaining failure (whitespace_test.dart, details/summary newlines) is pre-existing on master and unrelated.