This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.
**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
Fixes#109675.
This formula would produce an initial velocity quite different
from the one specified as an argument.
To update the test, I computed the expected results separately
by using the physical formula.
Happily, the framework by default never ends up actually exercising
this code. Of the four SpringDescription call sites within the
framework, two are explicitly overdamped; the other two are by
design critically damped, but due to rounding they end up being
treated as (very slightly) overdamped too. Details here:
https://github.com/flutter/flutter/issues/109675#issuecomment-1423674855
So the only way an app could be affected by this bug is if it called
a SpringDescription constructor itself, and managed to create a spring
description where the distinguishing formula in _SpringSolution comes
out exactly equal to zero. It's likely nobody has ever shipped such
an app, because the behavior this produces would be so wildly wrong
that it'd be hard to miss when exercised.
Co-authored-by: Kate Lovett <katelovett@google.com>
This turns on order shuffling for all tests that don't fail with it on, marking those tests that do fail with a tag so that they will be run without shuffling on.
To determine which tests fail with it on, I ran all the tests 100 times with different random shuffle seeds, and then also ran it with the date seeds from today until the end of July, and tagged all of the test suites (files) that fail, with a seed that caused them to fail.
Flutter's `moreOrLessEquals` has a few advantages over `closeTo` from
the `matcher` package:
* It emits the epsilon value in the test result on failure.
* It uses a named parameter for epsilon, which improves readability
at the call site.
* It has a reasonable default for epsilon in cases where something
more specific isn't required.
Using it also has the nice property that it aids in its own discovery
when when people go looking for such functionality in new tests.
This change also includes a couple unrelated whitespace formatting cleanups.
* 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
* 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
* PageView ballistics overshoot the page on some devices
On some devices, such as Cupertino “Plus”-sized devices, scrolling left on the first page of a PageView will overshoot the first page and land on the second page.
The issue is that applyContentDimensions incorrectly detects a content size change due to a floating point comparison on certain screen sizes (18257.400000000005 vs 18257.4)
To fix this, perform a nearEqual comparison in applyContentDimensions.
* Apply style changes to nearEqual for code review feedback.
* MultiTapGestureRecognizer previously would assert if there was no
competition.
* GestureArenaTeam would always select the first recongizer as the
winner even if a later recognizer actually accepted the pointer
sequence.
* debugPrintStack would fail a type check if maxFrames was non-null.
* FractionalOffset.lerp would throw a null-pointer exception if its
second argument was null.
Also, add a number of tests for previously untested lines of code.
Also, make hasOneLineDescription more discerning.
Also, add a test for hasOneLineDescription.
Also, add a test for GravitySimulation, to test the toString.