6143 Commits

Author SHA1 Message Date
Mattia Crovero
73dbca4142 Added ScrollController to TextField (#32620)
scrollController param on TextField and CupertinoTextField
2019-05-21 16:07:55 -07:00
Todd Volkert
27d3c2fcc8
Add support for ImageStreamListener.onChunk() (#33092)
This is another step towards supporting image loading
progress notification at the widgets layer.

This adds an `ImageChunkEvent` class along with associated
`ImageChunkListener` callback signature and an `onChunk`
property to `ImageStreamListener`. The events serve to
notify registered listeners when byte chunks are received
while loading an image.

https://github.com/flutter/flutter/issues/32374
2019-05-21 14:55:29 -07:00
Lorenz Nickel
ca4ad6dc5a Updated some links (#32444) 2019-05-21 14:48:42 -07:00
Greg Spencer
a389d17766
A minor bug fix and comment cleanups for focus (#33135)
This just fixes up some comments for DefaultFocusTraversal, and fixes a minor bug when setting the onKey on a FocusNode on creation before attaching to it.
2019-05-21 12:42:26 -07:00
Todd Volkert
ceec48785a
Re-apply "Add assert that the root widget has been attached" (#33084)
This re-applies #32437 with a fix to the broken device lab test.
2019-05-21 11:21:57 -07:00
Efthymis Sarmpanis
c6be1b9619 Fix apidocs in _WidgetsAppState.basicLocaleListResolution (#32638)
(all tests passed, github not displaying it)
2019-05-22 01:15:57 +08:00
Shi-Hao Hong
3265e15925
SliverAppBar shape property (#33073) 2019-05-21 08:30:58 -07:00
Todd Volkert
592f81e7c4
Add some sanity to the ImageStream listener API (#32936)
The current API was broken in that you registered multiple
callbacks at once, but when you removed listeners, only the
primary listener was used to determine what was removed.
This led to unintuitive cases where the caller could get
unexpected behavior.

This updates the API to add and remove listeners using
a newly introduced [ImageStreamListener] object, a value
object that has references to the individual callbacks
that may fire.

flutter/flutter#24722
flutter/flutter#32374
flutter/flutter#32935
2019-05-20 17:40:03 -07:00
Greg Spencer
d31ce31a27
Update enabled color for outlined text fields. (#33083)
Resets the enabled color for outline text field default borders to "On Surface 38%" instead of "On Surface 12%" to match spec. Also fixes the hover overlay to be "On Surface 12%" to match spec.
2019-05-20 17:25:59 -07:00
Todd Volkert
8eb7b72926
Add onBytesReceived callback to consolidateHttpClientResponseBytes() (#32853)
This will allow us to plumb the chunks in a chunked response
up to the higher levels of the framework to notify interested
parties of network loading progress.

https://github.com/flutter/flutter/issues/32374
2019-05-20 16:43:43 -07:00
Todd Volkert
2b15b24486
Add debugNetworkImageHttpClientProvider (#32857)
Currently, the fact that NetworkImage uses a static HttpClient
makes it impossible to properly test, as a mock in one test will
be reused in another test. This change fixes that.

https://github.com/flutter/flutter/issues/32374
2019-05-20 16:33:40 -07:00
Efthymis Sarmpanis
21e715014b Documentation fix for debugProfileBuildsEnabled (#32909) 2019-05-20 15:31:12 -07:00
Tong Mu
7f969d0f8a
Redo#2: Add buttons to gestures (#31935)
* Revert "Revert "Redo: Add buttons to gestures (#31819)" (#31912)"

This reverts commit 60a1b2b9ea761b4785a7c416417e64da4501ec0e.
2019-05-20 14:18:30 -07:00
Greg Spencer
d0c603d0bb
Turn off container focus highlight for filled text fields. (#33062)
This turns off focus highlight for filled text fields, since it turns out not to be to spec.
2019-05-20 13:39:53 -07:00
Todd Volkert
e2042bae6d
Revert "Add assert that the root widget has been attached. (#32437)" (#33068)
This reverts commit 069303d46fee7cc995c2ebcf253f7c5a87ab9533.
2019-05-20 13:30:41 -07:00
Sam Rawlins
c2a93bd545 Fix missing return statements on function literals (#33058) 2019-05-20 12:51:57 -07:00
Todd Volkert
069303d46f
Add assert that the root widget has been attached. (#32437) 2019-05-20 09:27:39 -07:00
Todd Volkert
eabdee80aa
Add widget of the week videos (#32982)
* AnimatedList
* Flexible
* Draggable
* ValueListenableBuilder
2019-05-20 07:54:56 -07:00
Greg Spencer
47a9ddc803
Make hover and focus not respond when buttons and fields are disabled. (#32914)
Disabled fields and buttons were responding to hover and focus changes, and they shouldn't.
2019-05-18 14:58:38 -07:00
Greg Spencer
76dccbe2fb
Use reverseDuration on Tooltip and InkWell. (#32904)
This puts the new AnimationController reverseDuration argument to use in two places: focus for InkWells and fade out for Tooltips.
2019-05-18 12:56:40 -07:00
LongCatIsLooong
8fa470f38c
Add CupertinoTabController (#31227)
Add CupertinoTabController that allows a CupertinoTabScaffold's current page to be controlled from an ancestor widget.
2019-05-17 09:59:12 -07:00
Shi-Hao Hong
a0ed52caa6
Add Doc Samples For CheckboxListTile, RadioListTile and SwitchListTile (#32703)
* Moved Radio documentation line to be above sample

* Added LabeledRadio sample

* Add LabeledCheckbox sample

* Add LabeledSwitch sample

* Added LinkedLabelRadio sample to RadioListTile

* Added LinkedLabelCheckbox sample to CheckboxListTile

* Added LinkedLabelSwitch sample to SwitchListTile

* Added reference to Semantics docs

* Improve simple SwitchListTile, RadioListTile and CheckboxListTile samples

* Added assets to all SwitchListTile, RadioListTile and CheckboxListTile samples
2019-05-17 09:24:26 -07:00
Justin McCandless
95eed87640
Add enableInteractiveSelection to CupertinoTextField and test it (#32823)
Adds a field that already exists in Material's TextField.
2019-05-17 07:56:11 -07:00
Greg Spencer
9f21ae0de5
Text field focus and hover support. (#32776)
This adds support for an animated focusColor and hoverColor to InputDecorator. This color will blend with the background over a fade in period whenever the InputDecorator is focused or hovered, respectively.

It also adds a Listener to the TextField to listen for hover events.
2019-05-16 17:31:46 -07:00
Darren Austin
8c05e8c1d4
Added a missing dispose of an AnimationController that was causing a ticker leak. (#32843) 2019-05-16 17:15:09 -07:00
chunhtai
3f92640521
Visual selection is not adjusted when changing text selection with TalkBack (#32832) 2019-05-16 14:41:39 -07:00
Alexandre Ardhuin
4fa32df141
use null aware operators (#32711)
* use null aware operators

* rollback changes about null-aware operator

* disable lint prefer_is_not_empty
2019-05-16 22:25:51 +02:00
Greg Spencer
3c16cf6a74
Fix Focus.of to not find FocusScope nodes. (#32826)
Until this change, Focus.of would return a FocusScopeNode if it found a FocusScope widget. This isn't really all that useful, and can easily lead to bad situations where many widgets think that the scope they are in (or the root scope!) is their indication of being focused.

This changes Focus.of to throw an exception if it doesn't find a Focus widget before reaching the nearest FocusScope widget, or the root of the widget hierarchy.

It also adds a nullOk optional bool to Focus.of so that if a caller expects to not find a Focus widget, it can deal with that as it sees fit. I modified InkWell to use this new behavior.

This fixes an unreported issue that widgets using an InkWell will be drawn as focused the first time they are visited.
2019-05-16 12:56:16 -07:00
Greg Spencer
64d1097e53
Add reverseDuration to AnimationController (#32730)
This adds a reverseDuration parameter to AnimationController so that the animation has a different duration when going in reverse as it does going forward.
2019-05-16 12:55:07 -07:00
Jason Simmons
f330804baf
Remove debug logging in _handleSingleLongTapEnd (#32825) 2019-05-16 12:30:42 -07:00
Greg Spencer
c8dbd00199
Skip flaky date picker tests on Windows (#32817)
Date picker tests have been flaky on Windows for a long time, and repeatedly require restarting of bots. In the interest of productivity, disabling them on Windows.

Related to #19696
2019-05-16 09:31:05 -07:00
Darren Austin
3d93f24c05
Tapping a modal bottom sheet should not dismiss it by default (#32528)
Removed the GestureDetector from the modal bottom sheet that dismissed it on tap and updated several tests to accommodate this change.
2019-05-15 15:50:39 -07:00
Amir Hardon
f545f47d8f
Add a FocusNode for AndroidView widgets. (#32773)
The PlatformViewsService listens for `viewFocused` calls on the
platform_views system channel and fires a callback that focuses the
focus node for the relevant AndroidView widget.
2019-05-15 15:25:50 -07:00
MH Johnson
da0a3a275a
[Material] Remove inherit: false on default TextStyle in bottom navigation bar (#32727) 2019-05-15 10:30:41 -04:00
Hans Muller
30fed3a05d
Material should not prevent ScrollNotifications from bubbling upwards (#32726) 2019-05-15 07:15:34 -07:00
Chris Bracken
0d8959448c
Correct platform reference in UiKitViewController (#32724)
Correct docs and error message for UiKitViewController to refer to iOS
view rather than Android views. Minor cleanup to the docs for
PlatformViewsService, which previously mentioned Android only.
2019-05-14 21:27:34 -07:00
Greg Spencer
bb3c660522
Implements focus handling and hover for Material buttons. (#31438)
This implements focus and hover handling for Material buttons. It inserts Focus widgets into the tree in order to allow buttons to be focusable via keyboard traversal (a.k.a. TAB traversal), and Listener widgets into the InkWell to allow the detection of hover states for widgets.

Addresses #11344, #1608, and #13264.
2019-05-14 20:48:29 -07:00
Greg Spencer
ed90d05596
Fix needsCompositing propagation from child widgets. (#32717)
This fixes propagation of needsCompositing from child widgets.

When needsCompositing is turned on by a child widget, it necessarily sets the needsCompositing bit of its parent widget, but RenderPointerListener was ignoring that piece of information and only turning on compositing if it thought it needed it for itself.

This corrects that, and adds a test for the condition, and updates a test that was affected by the change.

Fixes #32525 (again)
2019-05-14 17:09:29 -07:00
Darren Austin
752147e2b1
Added 'enabled' property to the PopupMenuButton (#32527)
Added 'enabled' property to the PopupMenuButton to allow the button to be disabled in the case where the menu would be empty.
2019-05-14 15:48:13 -07:00
Efthymis Sarmpanis
7498ad00b5 Add a more meaningful message to the assertion on children property of MultiChildRenderObjectWidget and SliverChildListDelegate. (#32487) 2019-05-14 12:41:07 -07:00
Hans Muller
d9f6cada1c
Tabs code/doc cleanup (#32654) 2019-05-14 12:00:03 -07:00
Mouad Debbar
bcae3563d4
Redo: Show/hide toolbar and handles based on device kind (#32704) 2019-05-14 11:04:16 -07:00
Mouad Debbar
ef5abcc6bf
Revert "Show/hide toolbar and handles based on device kind (#29683)" (#32702)
This reverts commit 18ca37542d8e946724f1ccc41b6d7c98c28d7164.
2019-05-14 09:33:04 -07:00
Mouad Debbar
18ca37542d
Show/hide toolbar and handles based on device kind (#29683) 2019-05-14 08:50:23 -07:00
Greg Spencer
96ebfec1a3
Add diagnostics around needsCompositing (#32656)
Added diagnostic output for needsCompositing to RenderObject diagnostics output.
2019-05-14 08:02:25 -07:00
Greg Spencer
a5053bfb29
Fix transforms for things with RenderPointerListeners (#32535)
This fixes #32525, because it now marks the compositing bits as needing to be recalculated if the mouse tracker changes its idea of whether or not a mouse is attached.

This bug occurred because the test framework was leaking state from one test to the next (the state about whether a mouse pointer was active), and so even though there was a "passing" test when run in order with the other tests in the file, when the test was run individually (or first), it would have failed and caught the bug.

This adds an assert to make sure that after each test there are no simulated mouse pointers connected, and now calls removePointer in all of the tests where this was a problem.
2019-05-13 15:48:12 -07:00
Shi-Hao Hong
41ff8408ca
Add Actions to AppBar Sample Doc (#32530)
* Add actions to AppBar sample doc
2019-05-13 15:19:14 -07:00
liyuqian
06f86c8b2f
Reland matrix check (#32521)
This relands flutter/flutter#31701 with missing const added

This reverts commit 549b412656bb4db80920de56a09912e079fdd2a2.
2019-05-13 14:36:09 -07:00
xster
1cd88c3501
Let CupertinoNavigationBarBackButton take a custom onPressed (#32469) 2019-05-13 12:41:24 -07:00
Shi-Hao Hong
9545c5d166
Tab Animation Sample Video (#32177)
* Improve tabs documentation regarding matching lengths

* Add Tabs animation to docs
2019-05-13 09:06:43 -07:00