• 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
..
src Loading commit data...
executable.dart Loading commit data...
runner.dart Loading commit data...