2487 Commits

Author SHA1 Message Date
Chris Bracken
6491cbf7a3 Ensure PrimaryScrollController is returned when primary: true (#8440)
Also a small formatting fix.
2017-02-27 17:17:29 -08:00
Chris Bracken
c8c37fcc85 Primary scroll view support for SingleChildScrollView (#8437) 2017-02-27 16:10:57 -08:00
Hans Muller
97083ac6aa Export DecorationPosition, use it in ListItem (#8427) 2017-02-27 12:24:02 -08:00
Adam Barth
932f7cef0c Scaffold shouldn't assert with large bottom padding (#8415)
Fixes #8413
2017-02-25 23:48:23 -08:00
Luke
87f1487e56 Adds un/selected text styles to the TabBar widget (#8417)
* Adds un/selected text styles to the TabBar widget

* Adding documentation on fallback values. Modified fallback on unselectedLabelStyle.
2017-02-25 23:39:22 -08:00
Adam Barth
f20c3d1032 Add a color argument to Container. (#8396)
It's common to just want a simple colored box. Simple thing should be simple,
so this patch adds a convenience argument to Continer for creating a box
decoration that is just a color.

Fixes #5555
2017-02-24 12:25:48 -08:00
Adam Barth
76394630ac Add barrierDismissable argument to showDialog (#8397)
In some situations, dialogs don't want the barrier to be dismissable.

Fixes #8354
2017-02-24 12:25:33 -08:00
Adam Barth
eb839755b7 Overscrolls should appear below pinned headers (#8383)
With slivers, the app bar is part of the scroll view. Naively, the overscroll
appears at the beginning of the scroll view, but that's not the desired
behavior. Instead, the app bar should remained pinned to the top of the scroll
view and the overscroll should appear below the app bar, which is what this
patch does.

Fixes #8228
2017-02-24 08:11:08 -08:00
Adam Barth
6a9ea16e9f jumpTo during a user drag shouldn't assert (#8384)
Fixes #8380
2017-02-23 19:08:27 -08:00
Alexandre Ardhuin
8c043d06de fix lints for directives_ordering rule (#8382) 2017-02-23 13:37:26 -08:00
Chris Bracken
093afe0255 Haptic feedback on time changes in TimePicker (#8348)
Trigger a vibration on hour/minute changes, with an upper bound on
number of feedback events per second.

Note: state changes are expected to trigger haptic feedback on Android,
but not on iOS time pickers.
2017-02-22 19:11:44 -08:00
Hans Muller
3a0b83b1b6 Added support for a pinned floating SliverAppBar (#8345) 2017-02-22 16:19:36 -08:00
Chris Bracken
9ada90a160 Suppress TimePicker haptic feedback on iOS (#8347)
State changes are expected to trigger haptic feedback on Android, but
not on iOS time pickers.
2017-02-22 16:16:52 -08:00
Adam Barth
5e93756f19 Clean up flipping of ScrollDirection (#8343)
Makes RenderViewport.layoutOneSide more readable.
2017-02-22 15:57:32 -08:00
xster
34a6e48ac8 16 dp title margin when there’s no leading button (#8344) 2017-02-22 14:53:53 -08:00
Adam Barth
fc9a00fd6c Improve the error message for unbounded viewports (#8321)
Rather than generating a cryptic assert, we now generate a more useful error
message.

Fixes #8296
2017-02-22 13:29:13 -08:00
Chris Bracken
6d135e4520 Eliminate extraneous bool in DatePicker haptic feedback (#8337) 2017-02-22 12:51:06 -08:00
Chris Bracken
c8f8d0014a Disable DatePicker vibrate on date change on iOS (#8335)
In the Android native material DatePicker, haptic feedback is expected
on date change. This is not expected behaviour for iOS date/time
pickers.
2017-02-22 12:03:57 -08:00
xster
72fa281f12 Conform appbar buttons to Material (#8263)
Extend app bar left to edge, right to 4dp
Make leading button square and 56dp
Keep title at 72dp on Android according to Material
Renamed IconButton.size to .iconSize
IconButton minimum size expands to 48dp (#8264)
IconButton default constraints to 48. Can still stretch to infinity but can't be smaller than 48.
Ink splash for IconButton 40% bigger than the touch target to match Material
Tests
2017-02-22 11:32:22 -08:00
Adam Barth
0e8b6aab46 ListView shouldn't be scrollable when there isn't any scroll extent (#8318)
Previously, a ListView would always accept user input, even if it wasn't
actually scrollable. Now, by default, we don't accept user input if there's no
scroll range. You can override this behavior using the ScrollPhysics.

Fixes #8276
Fixes #8278
Fixes #8271
2017-02-21 16:54:23 -08:00
Adam Barth
663862557b Factor WillPopScope out of Form (#8311)
This functionality is independently useful.

Fixes #8293
2017-02-21 14:40:13 -08:00
Adam Barth
434d6c3ff8 Improve Stack docs (#8312)
Discuss how to change paint order.
2017-02-21 14:14:25 -08:00
Adam Barth
addcb1f7af Move RenderViewport to its own file (#8310)
It doesn't need to be in the same file as RenderSliver.
2017-02-21 13:13:02 -08:00
Adam Barth
6d4333410b Don't try to pop the initial route (#8307)
This functionality got lots somehow in the migration to maybePop.

Fixes #8258
2017-02-21 12:57:32 -08:00
Adam Barth
862fc05139 Call onPageChanged at the halfway mark (#8302)
Previously we called onPageChanged when the scroll ended, but that is too late.
Now we call onPageChanged when we cross the halfway mark, which, for example,
makes the tab indicator update earlier.

Fixes #8265
2017-02-21 12:12:34 -08:00
Alexandre Ardhuin
da925c7d71 Replace @checked with covariant (#8300)
Fixes #7734
2017-02-21 09:30:22 -08:00
Adam Barth
df149c0b4b PageView should be able to resize from zero (#8286)
When resizing a PageView from 0x0, we weren't sure what the old page
number was because all the pages are collapsed at zero. Now we avoid the
divide by zero and default to the initialPage.

Fixes #8285
2017-02-19 14:12:57 -08:00
Adam Barth
64bae978f1 Add some dartdocs for slivers (#8284) 2017-02-18 21:00:27 -08:00
Adam Barth
a8e847aba9 PageView shouldn't crash in zero-size container (#8282)
Previously, we were dividing by zero.

Fixes #8281
2017-02-18 13:38:56 -08:00
Adam Barth
257be181fd Add some more dartdocs (#8259) 2017-02-17 21:38:20 -08:00
Ian Hickson
c4127ee60b Fix the transforms for horizontal glows. (#8252)
Also, make all painters have a toString by default.
2017-02-17 20:03:23 -08:00
Ian Hickson
f9c2d7d9aa Introduce a quick way to test across platforms (#8262) 2017-02-17 17:47:49 -08:00
Adam Barth
e0b12ca17e Two becomes one (#8253)
Rename all the "2" classes related to scrolling to remove the "2". Now that the
old scrolling code is gone, we don't need to use the suffix.
2017-02-17 14:06:15 -08:00
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
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
0d81bdf54d Unify the format of all objects' inclusion of hashCode in toString() (#8192) 2017-02-15 16:26:49 -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
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