677 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
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
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
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
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
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
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
David Yang
8838a8fbfa Allow for customization of hintText style in InputField (#7942)
* Allow for customization of hintText in InputField

* Adding tests.
2017-02-08 17:50:53 -08:00
Adam Barth
1ec625ffad Remove PageableList (#7997)
All clients have moved to PageView.
2017-02-08 15:50:30 -08:00
Adam Barth
4e95701541 Switch TabBarView to PageView (#7982)
Tabs are now fully driven by slivers.
2017-02-08 14:55:18 -08:00
Chris Bracken
ecdf99c326 Revert "Make the text shorter so that it doesn't overflow (#7970)" (#7984)
This reverts commit ea21d0c542d05a7738a8357db48fe9490c25c621 which
didn't resolve the pagination control overflow issue. Commit
7425940d5be153430f98aa5b0735545f4a4fc3e5 replaces this as an alternate
workaround. Once flutter/flutter#7980 is resolved, we should revert
7425940d5be153430f98aa5b0735545f4a4fc3e5 and scroll instead.
2017-02-08 13:10:01 -08:00
Chris Bracken
7425940d5b Prevent overflow of pagination bar with Ahem font (#7977)
Once engine commit d49a6b110bced49fa318b0dd45bf409218df9ee5 rolls into
Flutter rolls in, we get correct font metrics for the Ahem font, used in
headless sky_shell test runs. Ahem has much wider glyphs than the system
font, which causes the PaginatedDataTable bottom bar to be much wider
and overflow the previous and next controls offscreen.

This commit reduces the number of rows such that the prev/next controls
are still just barely onscreen.
2017-02-08 12:29:15 -08:00
Ian Hickson
ea21d0c542 Make the text shorter so that it doesn't overflow (#7970)
The Ahem font has a much wider average text width than most fonts.
2017-02-08 10:44:54 -08:00
Adam Barth
2eb4f2c37a Add PageController (#7948)
This patch improves PageView to the point where we can use it in the date
picker. Specifically, you now get onPageChanged notifications and you can
control which page is visible using a PageController.
2017-02-07 15:51:41 -08:00
Adam Barth
6ddd0bb4b8 Make ensureVisible work with sliver-based viewports (#7920)
There appears to be an issue with children before the center widget.
I've filled a bug about that issue and will follow up in a later patch.
2017-02-07 15:22:18 -08:00