• Paul Berry's avatar
    Ignore/fix dead_code checks for weak-only null checks. (#63794) · d80aa480
    Paul Berry authored
    Now that https://github.com/dart-lang/sdk/issues/41985 is fixed, the
    analyzer detects dead code due to "unnecessary" null checks.  Since we
    want to retain null checks in Flutter even when they appear
    unnecessary (in order to preserve runtime behavior in weak mode), we
    need to suppress these dead code hints.
    
    Note that one assertion is removed by this PR (`heightFactor != null
    || (heightFactor == 1.0 && heightDelta == 0.0)`).  This is because
    `heightFactor == 1.0 && heightDelta == 0.0` can only be true if
    `heightFactor != null`, so this assertion is equivalent to simply
    asserting that `heightFactor != null`, which is already asserted two
    lines above.
    d80aa480
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.cirrus.yml Loading commit data...
.codecov.yml 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...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...