3386 Commits

Author SHA1 Message Date
Ian Hickson
0962dd6a94 More better toStrings and more vigorous smoke testing of gallery (#8237)
* More better toStrings and more vigorous smoke testing of gallery

* Update scroll_controller.dart

* Update sliver.dart
2017-02-17 12:56:25 -08:00
Ian Hickson
0736fac441 DrivenScrollActivity._end didn't handle being already disposed (#8219) 2017-02-16 17:15:03 -08:00
Adam Barth
90574b0478 Remove Scrollable1 (#8225)
All the clients have migrated to Scrollable2.
2017-02-16 16:41:24 -08:00
Ryan Macnak
9ec5330f32 Roll engine to ab0953092743319e0dde3a0c8f582d261c232964. (#8223)
Update stack_trace_test.dart for changes to the naming of async body functions.
2017-02-16 16:13:17 -08:00
Ian Hickson
659bc2263d Port RefreshIndicator to slivers (#8218)
This does not attempt to correct any logic, only to port it as written.

The API changed a bit to take into account what is newly available and
no longer available in the new world.
2017-02-16 14:54:34 -08:00
Adam Barth
527fddc63f Port EditableText to Scrollable2 (#8167) 2017-02-16 13:23:56 -08:00
Adam Barth
1773e47b03 Remove a number of old scrolling widgets: (#8212)
- ScrollableList
 - ScrollableLazyList
 - LazyBlock
 - MaterialList

Clients should use ListView instead.
2017-02-15 21:30:51 -08:00
Adam Barth
f93daa4f3d Fix issues when correcting the scroll offset (#8211)
Previously, the scroll correction code path was untested. This patch
introduces a test for the code path and fixes two issues with it.
There's likely more work we'll need to do in this area to nail down all
the cases.

Fixes #8155
2017-02-15 21:01:13 -08:00
Todd Volkert
54f79e5aad Roll engine to 8218674d4af35b94cd9844aad3487dcffcdf6423 (#8208)
Fixes #8200
2017-02-15 16:34:54 -08:00
Todd Volkert
0d81bdf54d Unify the format of all objects' inclusion of hashCode in toString() (#8192) 2017-02-15 16:26:49 -08:00
Todd Volkert
6795c4ab96 Skip image_decoder_test to unbreak build bots (#8199) 2017-02-15 13:28:07 -08:00
Hans Muller
e09c5cfc66 Add SizedBox.fromSize() constructor (#8144) 2017-02-15 11:55:59 -08:00
Adam Barth
464a8e7cde Formally deprecate Block and ScrollableViewport (#8166)
The replacements are ListView and SingleChildScrollView, respectively.
2017-02-14 21:03:55 -08:00
Ian Hickson
ae9bd5ea92 Fix the depth of scroll notifications (#8156)
Fixes https://github.com/flutter/flutter/issues/8017
2017-02-14 19:01:17 -08:00
Adam Barth
cdc0f15f27 SingleChildScrollView can assert in LayoutBuilder (#8162)
We can't read our size in the offset setter because we might be in the middle
of layout. This issue also occured with the sliver-based viewport.
2017-02-14 18:49:11 -08:00
Ryan Macnak
15af4a04af Roll engine to b64c88766dbd83bf4bab1cd1cd1757139b6cdb74. (#8124)
* Roll engine to b64c88766dbd83bf4bab1cd1cd1757139b6cdb74.

Picks up changes to include inlined frames and line numbers in AOT stack traces.

* Adjust/weaken stack_trace_test.dart to pass in the face of async causal stack traces (Issue #8128).
2017-02-14 16:32:28 -08:00
Hans Muller
2d62d1b88d Test hero midflight reversals (#8161) 2017-02-14 16:03:32 -08:00
Ian Hickson
8ecaff2906 Positioned.fromRelativeRect (#8123)
Since RelativeRect's whole purpose in life is to make work with Stack
easier, it's silly that you can't directly use it with Positioned.

Also, tests for RelativeRect.
And fixes for the bugs that found...
2017-02-14 14:34:33 -08:00
Adam Barth
14743566ca Migrate Dropdown to ScrollConfiguration2 (#8135)
Also use the word "dropdown" consistently over "drop down".
2017-02-14 14:06:59 -08:00
Adam Barth
36f6405179 Remove OverscrollIndicator (#8134)
This feature is wired in differently in the new scrolling world.
2017-02-14 10:58:33 -08:00
Adam Barth
c2eb73498d Formally deprecate VirtualViewport (#8136)
This mechanism has been replaced by slivers.
2017-02-14 10:24:50 -08:00
Adam Barth
fd30f63161 Replace Scrollbar with Scrollbar2 (#8133) 2017-02-14 08:55:16 -08:00
Hans Muller
ef004ae97d New Heroes (#8112) 2017-02-14 08:20:16 -08:00
Adam Barth
a816611de1 Port remaining ScrollableViewport tests to SingleChildScrollView (#8129)
Also, rename ScrollableMetrics to ScrollMetrics, which follows the
naming convention for most of the other classes (e.g., ScrollPosition,
ScrollPhysics).

Finally, fix a bug whereby SingleChildScrollView could not have a
GlobalKey, because, write test, find bug.
2017-02-13 23:41:27 -08:00
Adam Barth
9df8b7211b Deprecate old list-based scrolling widgets (#8120)
- MaterialList
 - ScrollableList
 - ScrollableLazyList
 - LazyBlock

All of these widgets can be replaced by ListView now.
2017-02-13 17:45:29 -08:00
Ian Hickson
c67575703c Improve testing of the RefreshIndicator widget. (#8111) 2017-02-13 16:31:20 -08:00
Adam Barth
f36566fa6f Remove snap scrolling test (#8117)
The new scrolling machinery doesn't support snap scrolling.
2017-02-13 16:29:58 -08:00
Adam Barth
73518545e8 Port state_setting_in_scrollables_test to Sliver-based scrolling (#8116)
Also fixes a bug when trying to update the offset of a viewport in a layout
builder.

Fixes #8054
2017-02-13 16:25:26 -08:00
Adam Barth
2a6b6ac1eb Add some debugging aids (#8108)
I've been using these locally, but they're likely to be useful to other people
as well.
2017-02-13 15:35:48 -08:00
Adam Barth
c40b92b910 Material should unconditionally repaint on LayoutChangedNotification (#8107)
When a ListView scrolls, it generates a LayoutChangedNotification, which was
causing Material to repaint unconditionally. That's not necessary if there are
no ink effects that need to be moved. This patch skips the repaint in that
case.

Fixes #7937
2017-02-13 15:10:05 -08:00
Phil Quitslund
39f7d58b74 Escalate missing_required_param hints to warnings (#8087). (#8096)
Fixes: #8087.
2017-02-13 14:56:56 -08:00
Dan Rubel
ea74e07689 move flutter user analysis options file (#8091)
* move flutter user analysis options file
* add comments referencing each of the analysis options files
2017-02-13 16:39:35 -05:00
Adam Barth
07045c20a3 Fix cross-axis padding on reversed ListViews (#8077)
Previously the "left" padding was applied on the right when hit testing
a reversed vertical list view.
2017-02-12 12:31:00 -08:00
Adam Barth
749a09db63 Convert dismissable_test.dart to ListView (#8078)
This test was a bit tricky to convert because it subtly relied upon the
lazy evaluation of an Iterable.

The onDismissed from Dismissable happens during the animation phase of
the pipeline. Previously, the ScrollableList had already been built for
that frame but had not evaluated its Iterable yet. When we got to the
layout phase, ScrollableList evaluated its Iterable and saw the updated
version of dismissedItems.

A straightforward conversion to ListView calls toList() when building
the ListView, but that evaluates the iterable when buildTest() is
called, which is before the calls to pump and therefore before the
animation phase, meaning the Iterable sees the old value of
dismissedItems.

This patch fixes the test to use the normal setState pattern to signal
that state upon which the build depends has changed. Now, the
onDismissed callback happens during the animation phase and the
StatefulBuilder is marked as dirty via setState, which causes it to
rebuild the ListView and re-evaluate the Iterable, seeing the updated
version of dismissedItems.

This change also lets us replace the gratuious use of pumpWidget with
pump now that we use setState rather than pumpWidget to trigger a
rebuild.
2017-02-12 00:08:59 -08:00
Adam Barth
7cde72fea2 Make remember_scroll_position_test.dart pass (#8074)
We've decided not to store the scroll position in PageStorage because
routes now maintainState by default.

Fixes #8051
2017-02-11 13:13:01 -08:00
Adam Barth
8cde68d79f Migrate some tests from Block to ListView (#8055) 2017-02-10 14:50:36 -08:00
Adam Barth
63964f4887 Port ScrollNotification tests (#8057)
These now test ScrollNotification2.
2017-02-10 14:50:24 -08:00
Adam Barth
2bb94ec98a Remove most remaining ScrollableList clients (#8048) 2017-02-09 23:41:14 -08:00
Ian Hickson
8d2dcc3c9a Trivial improvements to the Drawer docs. (#8043)
Having the drawer docs lead with "this is a drawer" wasn't very
helpful when scanning.

qv. study P6.
2017-02-09 22:09:15 -08:00
Ian Hickson
473b67ef19 Trivial style nits (#8042) 2017-02-09 15:31:21 -08:00
Alexandre Ardhuin
00cbdb3800 prefer const constructor (#8031) 2017-02-09 15:18:49 -08:00
Alexandre Ardhuin
60f5cbbad2 no const contructor for GlobalKey (#8038) 2017-02-09 15:17:45 -08:00
Adam Barth
c9e4541c02 Port LazyBlock tests to ListView (#8026) 2017-02-09 10:35:24 -08:00
Adam Barth
1a61a76e21 Port scrollable_lazy_list_test.dart to ListView (#8025)
We call the builder in slightly different ways, but the new results
seem reasonable.
2017-02-09 10:05:00 -08:00
Mehmet Fidanboylu
ca2c54bac2 Support changing the dismissable threshold (#8007)
* Support changing the dismissable threshold for any direction for dismissable widget.

* Fixing review comments.
2017-02-09 09:46:43 -08:00
Alexandre Ardhuin
d1d1c50cbe prefer const constructors (#8024) 2017-02-09 00:57:38 -08:00
Adam Barth
3ca921610c Remove ScrollableGrid (#8020)
All the clients have migrated to GridView.  Also, remove RenderGrid,
which isn't needed by GridView.
2017-02-08 22:08:56 -08:00
Ian Hickson
ba9d5e9248 Add tests for Baseline. (#8021) 2017-02-08 21:43:22 -08:00
Adam Barth
311e77ab7c Fix main stocks screen (#8008)
We weren't triggering a relayout when the number of children changed.

Fixes #8001
2017-02-08 20:40:07 -08:00
Ian Hickson
83a4cf269f Port AppBar to Scrollable2 (#7996)
Move the back button and drawer opening logic into the app bar.

Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.

Make it possible to track when a route becomes or stops being poppable.
2017-02-08 18:16:19 -08:00