1. 13 Mar, 2024 1 commit
  2. 26 Feb, 2024 1 commit
    • Nate's avatar
      Implementing `switch` expressions in `rendering/` (#143812) · 60d28ad9
      Nate authored
      This pull request is part of the effort to solve issue #136139.
      
      The previous [`switch` expressions PR](https://github.com/flutter/flutter/pull/143496) was comprised of many simple changes throughout `flutter/lib/src/`, but due to some more in-depth refactoring in `flutter/lib/src/rendering/`, I decided to submit the changes to this directory as a separate pull request.
      
      There was really just one function that I changed significantly; I'll add a comment for explanation.
      60d28ad9
  3. 16 Feb, 2024 1 commit
    • Nate's avatar
      Implementing `switch` expressions [refactoring `flutter/lib/src/`] (#143496) · 944cd11d
      Nate authored
      This PR is the 8ᵗʰ step in the journey to solve issue #136139 and make the entire Flutter repo more readable.
      
      (previous pull requests: #139048, #139882, #141591, #142279, #142634, #142793, #143293)
      
      I did a pass through all of `packages/flutter/lib/src/` and found a whole bunch of `switch` statements to improve: most of them were really simple, but many involved some thorough refactoring.
      
      This pull request is just the complicated stuff. 😎 I'll make comments to describe the changes, and then in the future there will be another PR (and it'll be much easier to review than this one).
      944cd11d
  4. 13 Oct, 2023 1 commit
    • Todd Volkert's avatar
      Make constraints a covariant argument in RenderBox.computeDryLayout() (#136432) · bc688cf0
      Todd Volkert authored
      Some render box subclasses have a specific layout contract that is tightly coupled with other render box subclasses (e.g. two private classes in a local project file). In these cases, it is also possible that they use a constraints object that is a subclass of `BoxConstraints`. To allow for this, this change makes the `constraints` argument to `RenderBox.computeDryLayout()` a covariant argument.
      
      For completeness' sake, this updates the other render objects in the rendering package to also use the covariant keyword for this argument.
      bc688cf0
  5. 28 Sep, 2023 1 commit
  6. 27 Sep, 2023 1 commit
  7. 20 Sep, 2023 1 commit
    • Greg Spencer's avatar
      Remove 'must not be null' comments from painting and rendering libraries. (#134993) · fe9a2c54
      Greg Spencer authored
      ## Description
      
      This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values.
      
      This PR removes them from the painting and rendering libraries.
      
      This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.
      
      In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.
      
      This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).
      
      ## Related PRs
      - https://github.com/flutter/flutter/pull/134984
      - https://github.com/flutter/flutter/pull/134991
      - https://github.com/flutter/flutter/pull/134992
      - https://github.com/flutter/flutter/pull/134994
      
      ## Tests
       - Documentation only change.
      fe9a2c54
  8. 23 Aug, 2023 1 commit
  9. 16 Jun, 2023 1 commit
  10. 31 Mar, 2023 1 commit
  11. 23 Mar, 2023 1 commit
  12. 22 Mar, 2023 1 commit
  13. 20 Mar, 2023 1 commit
  14. 21 Jan, 2023 1 commit
  15. 31 Oct, 2022 1 commit
  16. 27 Jul, 2022 1 commit
  17. 24 Jun, 2022 1 commit
  18. 25 May, 2022 1 commit
  19. 20 May, 2022 1 commit
  20. 19 May, 2022 2 commits
  21. 18 May, 2022 1 commit
  22. 17 May, 2022 1 commit
  23. 14 Apr, 2022 1 commit
  24. 21 Mar, 2022 1 commit
  25. 12 Dec, 2021 1 commit
  26. 20 Oct, 2021 1 commit
  27. 01 Oct, 2021 1 commit
  28. 30 Aug, 2021 1 commit
  29. 25 Aug, 2021 2 commits
  30. 03 Aug, 2021 1 commit
  31. 28 Jul, 2021 1 commit
  32. 25 Jun, 2021 1 commit
  33. 13 May, 2021 1 commit
  34. 03 Apr, 2021 1 commit
  35. 31 Mar, 2021 1 commit
  36. 18 Mar, 2021 1 commit
  37. 18 Feb, 2021 1 commit
  38. 07 Jan, 2021 1 commit