* Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f.
Changes since last roll:
```
b6df7a637 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (#4771)
a6764dbd5 Add sources for Fuchsia target. (#4763)
2d5900615 [fuchsia] Remove unused header file. (#4769)
9717063b7 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)" (#4768)
9a9814312 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)
e74e8b35c [async] Update includes of async headers to new path (#4760)
e2c4b2760 Use Dart 2 camel case constants in the engine Dart libraries (#4766)
9c1e48434 Updates for Fuchsia roll. (#4765)
14c940e27 Switch from fxl::Mutex to std::mutex (#4764)
debf82c0b Roll Garnet (#4759)
5bffdefbb Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (#4761)
```
* Update dependencies with forced upgrade.
Now that https://github.com/flutter/flutter/issues/15261 is fixed, do the update with upgrade.
* Update test package use following upgrade
* Replace addOption(allowMultiple) with addMultiOption
30+4 has made some changes to the remoting protocol that are incompatbile
with a test harness running 30+3 (e.g. adding a type='initial' field to the
first message)
* Use engine-built dart sdk
* Download dart-sdk from engine
* Move up deps to fix dart sdk constraint problem
* Update update_dart_sdk.ps1 for Windows
* Fix tests so they pass analysis
* More types for tests
* Roll engine
* Update dart sdk stamp location in flutter.bat
* Add newline
There were some problems I introduced with the last PR for this. It passed the test, but failed in practice.
This adds tests for those failure cases, adds a "--help" and fixes the test so that it doesn't try and actually download MinGit as part of the Windows test.
I added package:platform as a dependency, so I did a force upgrade on the packages.
Also, re-enabling 'create package' in the cache warming code, now that #14448 is fixed.
For backward compatibility we keep supporting specifying the shape as a
combination of MaterialType and borderRadius, and we just use that as a
default when shapeBorder is null.
To cleanup the implementation if shapeBorder was not specified we just
translate the specified shape to a shapeBorder internally.
I benchmarked paint, layout and hit testing, with the specialized shape
clippers vs. the equivalent path clippers and did not see any
significant performance difference.
For testing, I extended the clippers/physicalShape matchers to match either the
specialized shape or the equivalent shape.
* Unpin package:test and upgrade packages
* Update packages/flutter/test/foundation/stack_trace_test.dart
* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
Generate the "version" file from git tags.
Remove the old VERSION file and mentions of versions in pubspec.yaml files.
Replace the old update_versions.dart script with a new roll_dev.dart script.
Update "flutter channel".
Update "flutter upgrade", including making it transition from alpha to dev.
Update "flutter --version" and "flutter doctor".
* Revert "Reverting package changes until I can figure out how to fix Windows. (#14007)"
This reverts commit 6fda8ee821.
* Make prepare_package run on Windows
* Revert "Fixed output validation. (#14005)"
This reverts commit d84398db72.
* Revert "Update package prep script to do async process execution and emit output as it happens. (#13918)"
This reverts commit b7169c1d95.
- Switches to async process execution, which now shows output as it happens instead of in chunks when the process completes
- Now uses ProcessManager so that it may be mocked for the test.
- Adds in the download and install of mingit on Windows.
- Updated package dependencies because of added dependency on process package.
This simply updates the package dependencies by running flutter update-packages --force-upgrade.
I'm doing this with no other changes, because the last time I tried that, redness occurred. I want to isolate the problem to a "clean" update of the packages.
It looks like the plugins device_info, connectivity, and url_launcher haven't yet had their gradle configurations updated, so they fail when trying to build with the new gradle. I did not upgrade for those three packages only (in flutter_gallery) until we are ready to fix them (fixing them for master will break them for alpha users, so we need to do an alpha roll to do that).
This adds our self-compiled copy of the MinGit executable (built from the flutter/git repo) to the archive when building an archive for Windows.
I also tweaked the internal API for prepare_package.dart so that there's a single entry point to build an archive.
Also:
* Remove find.byIcon since it's identical to find.icon. (I sent mail to flutter-dev about this.)
* Fix IconData's operator== and hashCode, which had not been updated when we added fields.
* Add the byTooltip finder to the list of suggested finders.
* Make the suggested Key finder prettier.
* make time picker accessible
* use new CustomPaint a11y API
* flutter_localizations tests; use bigger distance delta
* fix am/pm control; selected values
* fix translations; remove @mustCallSuper in describeSemanticsConfiguration
* exclude AM/PM announcement from iOS as on iOS the label is read back automatically
This allows the scheduler library to depend on the services library
and the painting library to depend on the scheduler library without
the services library having to depend on the scheduler library.
While I was at it I also cleaned up some of the binding logic: the
licenses logic can now be overridden (and the test library does so),
and the image cache can now be overridden as well.
Fix the dismissible demo in the gallery (make it actuall update when you pick something from its menu; give it a better affordance for resetting once you've dismissed everything).
Improve some docs.
Fix various flinging bugs with dismissible. Add tests for those cases.
Add a feature to flutter_test to support a drag-then-fling gesture (used by the flinging tests).
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.
This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.
It also:
* Adds *.iml to the .gitignore
* Removes existing .iml files from the repo, and moves them to the
packages/flutter_tools/ide_templates/intellij directory.
* Adds a flag to ide-config ('--update-templates') that will take any new .iml
files in the flutter tree and add them to the existing templates.
- If --overwrite is also specified, then all existing templates will also
be overwritten with the contents from the flutter tree, and any that have
been deleted from the flutter tree will also be removed from the
templates.
* Added new run configurations for all existing app targets that will now also
be automatically added to IntelliJ.
* Setting up the environment also includes setting the coding style guidelines
and the git VCS.
* Note that after this PR lands, Flutter developers will need to run it once to
re-create the .iml files and configuration files that have been removed.
After this PR lands, .iml files will no longer appear in the untracked files
section for git.
Various improvements (in particular a new painting fuzzer) to the text manual test.
Some additional documentation.
A fix to Stack to remove an LTR bias: make unpositioned children apply "alignment".
Some more debugging information on RichText and Text.
A fix to the flutter tool to not crash when an RPC call throws an exception.
* fix updrade script; upgrade to the latest package versions
* exclude special dependencies from transitive closure
* fix stack trace handling in flutter_test due to stack_trace change
* change type on _emptyStackTrace
Also:
* Provide a better message when you lerp from infinity to finity
constraints.
* Make the striped marker support RTL.
* By popular demand, dump a warning to the console the first time
a particular Flex overflows. (Resets on hot reload.)
* Pin all dependencies ONCE AND FOR ALL
This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.
* Add comments.
* only tap on widgets reachable by hit testing
* use FractionalOffset
* added tests
* check finder finds correct widget
* undo unintentional changes
* address comments
* style fix
* add Directionality in test
* fix analysis warning
Since the called function can't throw, there is no need for the "guarded".
Since the function returns something, running in guarded mode doesn't really work. The `uncaught` handler wouldn't know what to return (except for `null`).
* Introduce a Directionality inherited widget which sets the ambient LTR vs RTL mode (defaulting to null, which means you cannot use directionality-influenced values).
* Make it possible to configure Padding (including Container.padding and Container.margin) using a directionality-agnostic EdgeInsets variant.
* Provide textDirection and verticalDirection controls on Row and Column to make them RTL-aware.
* Introduce a variant of FractionalOffset based on the EdgeInsets variant. Not yet actually used.
* Fix all the tests that depended on Row defaulting to LTR.
The most recent Flutter IntelliJ plugin replaces FLUTTER_MODULE with
WEB_MODULE and eliminates the exclusion of packages/ directories.
Use of the packages/ directory was turned off by default months ago, and
is replaced by the .packages file.
It was 8.0. It's now arbitrarily 18.0.
Changing this required adjusting some tests. Adjusting the tests
required debugging the tests. Debugging the tests required some tools
to help debugging gesture recognizers and gesture arenas, so I added
some. It also required updating some toString() methods which resulted
in some changes to the tree diagnostics logic.
Also I cleaned up some docs while I was at it.
Mainly, this adds documentation to members that were previously
lacking documentation.
It also adds a big block of documentation about improving performance
of widgets.
This also removes some references to package:collection and adds
global setEquals and listEquals methods in foundation that we can use.
(setEquals in particular should be much faster than the
package:collection equivalent, though both should be faster as they
avoid allocating new objects.) All remaining references now qualify
the import so we know what our remaining dependencies are.
Also lots of code reordering in Flutter driver to make the code
consistent and apply the style guide more thoroughly.
* Add hasAGoodToStringDeep and equalsIgnoringHashCodes methods.
Methods simplify testing of toStringDeep calls and other cases where
methods return strings containing hash codes.
Also, I had a question about flutter_test matchers and our style guide
says that when I have a question I should update the docs so I did
that and then got a bit carried away.
This splits the frame pipeline into two, beginFrame and drawFrame.
As part of making this change I added some debugging hooks that helped
debug the issues that came up:
* I added debugPrintScheduleFrameStacks which prints a stack whenever
a frame is actually scheduled, so you can see why frames are being
scheduled.
* I added some toString output to EditableText and RawKeyboardListener.
* I added a scheduler_tester.dart library for scheduler library tests.
* I changed the test framework to flush microtasks before pumping.
* Some asserts that had the old string literal form were replaced by
asserts with messages.
I also fixed a few subtle bugs that this uncovered:
* setState() now calls `ensureVisualUpdate`, rather than
`scheduleFrame`. This means that calling it from an
AnimationController callback does not actually schedule an extra
redundant frame as it used to.
* I corrected some documentation.
This patch introduces the notion of a keyboard token, which generalizes the
logic in EditableText for distinguishing between gaining focus by default and
gaining focus because of an explicit use action.
Fixes#7985
* Manually fix every use of Point.x and Point.y
Some of these were moved to dx/dy, but not all.
* Manually convert uses of the old gradient API
* Remove old reference to Point.
* Mechanical changes
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'
* Mechanical changes - dartdocs
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'
* Further improvements and a test
* Fix minor errors from rebasing...
* Roll engine
* Fix tests to use Ahem, and helpful changes around that
- Fix fonts that had metric-specific behaviours.
- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
to LiveTestWidgetsFlutterBinding.framePolicy.
- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
that pumps slightly more frames, to animate the pointer crosshairs.
- Added "flutter run --use-test-fonts" to enable Ahem on devices.
- Changed how idle() works to be more effective in live mode.
- Display the test name in live mode (unless ahem fonts are enabled).
- Added a toString to TextSelectionPoint.
- Style nit fixes.
* Roll engine to get Ahem changes.
* Update tests for dartdoc changes.
* Fix flutter_tools tests
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
Breaking change: removed deprecated methods of PlatformMessages, leaving only binary messaging there. All other use of platform communication now goes through PlatformMessageChannel and PlatformMethodChannels. Retained use of String and JSON codecs for now.
Companion engine PR: flutter/engine#3482
* Bump to test `0.12.20`.
Some test `0.12.20` highlights:
* introduces `expectLater()` that returns a `Future` that completes when the matcher has finished running
* deprecates the `verbose` parameter to `expect()` and the `formatFailure()` (to be removed in `0.13.0`)
Otherwise:
* to keep up w/ the deprecation of `verbose`, removes `widget_tester` API to pass `verbose` flag (alternatively we could suppress the warning for now)
* Update stack manipulation.
* Fix framecount.
* Add find.descendant API to support find descendants of an element by passing the current element and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
- output single-line JSON because iOS 9.x cannot output more than one line
- move the workaround for #7433 into LiveTestWidgetsFlutterBinding so that it works in all cases (e.g. animation_bench.dart on iOS)
Also, make hasOneLineDescription more discerning.
Also, add a test for hasOneLineDescription.
Also, add a test for GravitySimulation, to test the toString.
```dart
expect(x, moreOrLessEquals(0.0));
```
...for those cases where `x` might be 1e-11 or whatever.
Also, be more resilient when dumping the tree from inside the test framework.
Also, add an assert that helped me debug something the other day.
We were trying to update the tooltip overlay entry, but that cannot work
because the overlay entry might have already built. Instead, we keep the
old value.
Fixes#7151
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package