- 18 Jan, 2023 1 commit
-
-
Paul Berry authored
* Fix applyBoxFit's handling of fitWidth and fitHeight. Previously, in `fitWidth` mode, if the input size had a wider aspect ratio than the output size, `applyBoxFit` would make the source rect taller than the input size in order to match the aspect ratio of the destination rect. Similarly, in `fitHeight` mode, if the input size had a taller aspect ratio than the output size, `applyBoxFit` would make the source rect wider than the input size in to match the aspect ratio of the destination rect. This is in contrast to all the other modes, which never output a source rect that's larger than the input size. Most of the time this worked as intended (since attempting to blit pixels that are outside the source image has no effect), however it meant that if a user attempted to create a `BoxDecoration` that used both `fitWidth` and `repeatY` (e.g. in an attempt to tile a background image), the image would not actually appear to repeat, since the logic in `paintImage` for determining the proper tiling stride is based on the destination image size, meaning that the entire destination rect would be covered in a single tile. This change modifies `applyBoxFit` so that in `fitWidth` mode, if the input size has a wider aspect ratio than the output size, it uses formulas that are equivalent to `contain`, whereas if the input size has a taller aspect ratio than the output size, it uses formulas that are equivalent to `cover`. And vice versa for `fitHeight` mode. This produces source and destination rects that match the behaviour specified in https://api.flutter.dev/flutter/painting/BoxFit.html. * Apply suggestions from code review Co-authored-by: Michael Goderbauer <goderbauer@google.com>
-
- 16 Mar, 2021 2 commits
-
-
Ian Hickson authored
-
Zachary Anderson authored
This reverts commit 0cbe5975.
-
- 15 Mar, 2021 1 commit
-
-
Ian Hickson authored
-
- 03 Oct, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 11 Jun, 2020 1 commit
-
-
Alexandre Ardhuin authored
* add language version 2.8 in packages/flutter * enable non-nullable analyzer flag
-
- 27 Nov, 2019 1 commit
-
-
Ian Hickson authored
* Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs
-
- 06 Mar, 2019 1 commit
-
-
Alexandre Ardhuin authored
* fix some formatting issues * address review comments * fix indent
-
- 15 Aug, 2018 1 commit
-
-
Ian Hickson authored
* Upgrade everything except matcher. * Roll matcher (and test) * Adjust tests that depend on flutter:test directly to depend on a shim * Require use of package:test shim and remove other references to package:test
-
- 02 Feb, 2018 1 commit
-
-
Alexandre Ardhuin authored
-
- 01 Sep, 2017 1 commit
-
-
Andrew Wilson authored
-
- 29 Mar, 2017 1 commit
-
-
Adam Barth authored
-
- 17 Mar, 2017 1 commit
-
-
Adam Barth authored
This machinery is useful for arbitrary boxes (e.g., with FittedBox). Fixes #6463
-
- 10 Jan, 2017 1 commit
-
-
Adam Barth authored
This patch improves test coverage for a number of files that had low coverage. This patch also fixes a few minor bugs found by these tests.
-
- 29 Jul, 2016 1 commit
-
-
Ian Hickson authored
Also, add FractionalOffset.inscribe.
-