2456 Commits

Author SHA1 Message Date
Jason Simmons
841286d652
Framework support for font features in text styles (#33230)
See https://github.com/flutter/flutter/issues/31691
2019-05-28 11:06:54 -07:00
Greg Spencer
7c811b6a66
Fix first focus determination. (#33279)
Replacing the algorithm for finding the first focusable item in the focus tree. Somehow it was a kind of gibberish before, and really didn't work or make sense.
2019-05-28 10:19:19 -07:00
Jonah Williams
a656bcf54f
rename test file that misnamed (#33361) 2019-05-28 09:56:13 -07:00
Chris Bracken
156b4220b4
Americanise spellings (#33323)
Updates documentation and non-public API to use American spellings for
consistency with the rest of the codebase.

No changes to behaviour... other than how it's spelt.
2019-05-24 19:13:02 -07:00
Chris Bracken
4d9923201b
Correct typos (#33322)
Corects a bnuch of typeos throuhgout teh Fluter codebsae.

Made use of the `misspell` tool:
https://github.com/client9/misspell
2019-05-24 19:12:45 -07:00
Shi-Hao Hong
9d52085344
ExpandIcon Custom Colors (#33148)
* Implement ExpandIcon custom color, expandedColor, and disabledColor

* Update to use pumpAndSettle instead of hard-coded duration

* Update colors to unfocused state, added dark mode test to active state

* Fix Colors.white30 doc opacity value

* Add links to Material Design specifications to color, expandedColor and disabledColor

* Update API docs to reference dark theme material page
2019-05-24 09:06:23 -07:00
Paul Berry
9a16900ed1
Pass an async callback to testWidgets. (#33260)
The dart analyzer fails to warn about missing returns in function expressions due to a bug that has been
fixed but not yet rolled into Flutter (see
https://dart-review.googlesource.com/c/sdk/+/100301).  So it failed to catch that https://github.com/flutter/flutter/pull/33217 accidentally introduced a call to `testWidgets` that passed it a synchronous callback.
2019-05-23 10:17:22 -07:00
Justin McCandless
6031c56d4c
Material Long Press Text Handle Flash (#32911)
Fix a bug where holding down on text selection caused the handles to flash. The fix was to only update selection when it actually changed.
2019-05-23 08:15:59 -07:00
Todd Volkert
be2918ff30
Fix ImageStreamListener's hashCode & operator== (#33217)
I forgot to add `onChunk` to them in #33092
2019-05-22 18:14:01 -07:00
Jason Simmons
a6f1c095dc
Engine roll 75963dbb0ba6..64f18f2cb686 (#33157) 2019-05-22 10:19:08 -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
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
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
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
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
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
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
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
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
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
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
Kate Lovett
829bdeb426
Fixing accidental merge from WIP branch. (#32520)
Revert "Merge branch 'master' into master"

This reverts commit e3a03c04c4530b06e77383fd73d2c43644dc832a, reversing
changes made to 64749826498123e795c77f9bec8cea804a40a051.
2019-05-10 15:53:41 -07:00
Kate Lovett
e3a03c04c4
Merge branch 'master' into master 2019-05-10 15:16:40 -07:00
Dan Field
382704ca95
Use precisionErrorTolerance (#32499) 2019-05-10 13:28:19 -07:00
Jonah Williams
549b412656
Revert "Add more asserts to check matrix validity (#31701)" (#32496) 2019-05-10 10:05:15 -07:00
liyuqian
0dc290c023
Add more asserts to check matrix validity (#31701)
## Description

These will help identify where the matrix starts to get wrong. 

Also fixed `RenderFittexBox` to no longer paint with empty child which previously triggered invalid matrix computations (NaN with dividing by 0). See also https://github.com/flutter/flutter/pull/7489

## Related Issues

https://github.com/flutter/flutter/issues/31650
https://github.com/flutter/flutter/issues/31700
https://github.com/flutter/flutter/issues/7431

## Tests

* RenderFittedBox does not paint with empty sizes
2019-05-10 09:33:09 -07:00
Riccardo Ratta
705143855f Make font semibold when isDefaultAction is true in CupertinoDialogAction (#31308)
Make font semibold when isDefaultAction is true in CupertinoDialogAction
2019-05-10 08:22:56 -07:00
Hans Muller
6d0e235cf8
Support for replacing the TabController, after disposing the old one (#32434) 2019-05-09 22:02:46 -07:00