• Andrew Kolos's avatar
    Fix `AssetsEntry::equals` (#143355) · 14bcc694
    Andrew Kolos authored
    In service of https://github.com/flutter/flutter/issues/143348.
    
    **Issue.** The `equals` implementation of `AssetsEntry` is incorrect. It compares `flavors` lists using reference equality. This PR addresses this.
    
    This also adds a test to make sure valid asset `flavors` declarations are parsed correctly.
    
    While we are here, this PR also includes a couple of refactorings:
      * `flutter_manifest_test.dart` is a bit large. To better match our style guide, I've factored out some related tests into their own file.
      *  A couple of changes to the `_validateListType` function in `flutter_manifest.dart`:
          * The function now returns a list of errors instead of accepting a list to append onto. This is more readable and also allows callers to know which errors were found by the call.
          * The function is renamed to `_validateList` and now accepts an `Object?` instead of an `YamlList`. If the argument is null, an appropriate error message is contained in the output. This saves callers that are only interested in validation from having to write their own null-check, which they all did before.
          * Some error strings were tweaked for increased readability and/or grammatical correctness.
    14bcc694
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.ci.yaml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
TESTOWNERS Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...