This patch aligns the iteration patterns used by animations and
ChangeNotifier. They now both respect re-entrant removal of listeners
and coalesce duplication registrations. (Also, ChangeNotifier
notification is no longer N^2).
This patch introduces ObserverList to avoid the performance regression that the
previous version of this patch caused.
Fixes#7533
MockCanvas to use it instead.
Currently it only supports a very limited set of drawing features, but
adding new ones is easy.
Once the feature set is more complete, and we've used this a bunch, if
it feels right, this API will get promoted to flutter_test.
Also, defer to test package for throttling (this will require a test
package update as well).
Also, add a lot more instrumentation to --verbose mode for tests, and
fix minor trivial things here and there, and add error handling in
more places.
Also, refactor how coverage works to be simpler and not use statics.
When a machine is heavily loaded, it can severely delay the time it
takes for the OS to start a process once it's asked to do so. Our
5 second timeout that we were giving the test process to connect
to the test harness seemed like plenty of time, were it not for the
fact that the test process itself was not being started in time when
CPU throttling was in effect.
This change updates the test timeout to begin counting only once the
test process has been started. We keep the original timeout in play
in the event that the test process *never* starts up for some reason,
but we up that timeout value to 5 minutes.
Previously, the icon in the tooltip demo was black on black background
in the dark theme. Now it is white on black background in the dark theme
and black on white background in the light theme.
fixes#7018
Stop building (unused) unlinked summaries for packages.
Improves update speed considerably (for `n` packages it saves us `n` needless calls to `pub get`).
This patch aligns the iteration patterns used by animations and
ChangeNotifier. They now both respect re-entrant removal of listeners
and coalesce duplication registrations. (Also, ChangeNotifier
notification is no longer N^2).
Fixes#7533
Previously, these classes where in material.dart, which meant they could
access private interfaces in that library. This patch moves them out
into their own files so that they need to play by the rules of the
public API.
Fixes#5969
It's not correct to set sizedByParent for
RenderCustomSingleChildLayoutBox because the delegate's size function
might depend on information other than the incoming constraints.
Previously the navigator wouldn't always call Route.dispose when it was
removed from the tree. After this patch, the navigator remembers popped
routes so that it can call dispose on them when it is removed from the
tree.
Also, improve some error messages around calling dispose() more than
once on routes and AnimationControllers.
Fixes#7457
The only client of this machinery was AnimationController.fling, but
it's easier for that function to just create the simulation it needs
directly.
Fixes#7216
Our test script is getting complicated enough that doing your own
testing with a custom engine has become tedious. Now you can just do:
```bash
(cd ~/dev/flutter/; FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt dev/bots/test.sh)
```
...to run all your tests (assuming your flutter repo is in
`~/dev/flutter` and your engine in `~/dev/engine`).
* 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.
This is handy for debugging a test. Communication is logged to:
* `flutter_driver_commands_{x}.log`, where {x} is an integer, and
* (if requested by user) to stdout
fixes#7473
The demo of the SimpleDialog had some useful code that should really be part of
the framework. This patch extracts it into a SimpleDialogOption widget.
Remove debugCheckHasScaffold because it is unused.
Also, add tests for InkWell, SimpleDialog, and other widgets.
Previously, the Slider used a drag gesture recognizer to move the head
of the slider, but when the slider was in a vertical scroller, the
recognizer would wait until the user moved the pointer by enough pixels
to disambiguate between sliding the slider and scrolling the scroller.
That worked fine for actual drags, but the slider should also move when
the user taps the track. This patch introduces a tap recognizer to
handle that behavior.
To avoid the slider's drag and tap recognizers from competing with each
other in the arena, this patch introduces the notion of a
GestureArenaTeam, which lets several recognizers combine to form one
entry in the arena. If that entry wins, the team picks the first of its
recognizers as the winner, avoiding latency.
Fixes#7454
Now IconThemeData.fallback is a factory constructor and IconThemeData.of() does
the work of computing the fallback for its clients.
Also, add tests for ImageIcon and ListItems.
With frameSync enabled, flutter_driver actions will only be performed
when there are no pending frames in the app under test. This helps with
reducing flakiness.