2479 Commits

Author SHA1 Message Date
Jonah Williams
90500a5dc4
Use conditional imports for flutter foundation libraries (#33663) 2019-06-03 14:56:15 -07:00
chunhtai
730025fa17
fix issue 14014 read only text field (#32059) 2019-06-03 14:00:43 -07:00
Todd Volkert
5441044132
Revert "Update consolidateHttpClientResponseBytes() to use compressionState (#33729)" (#33790)
This reverts commit 306a09a384e6ba0fe02ae3a44d28ceeb372b3a25.
2019-06-03 13:48:27 -07:00
Jonah Williams
6619ab8fea
Add web safe indirection to Platform.isPlatform getters (2) (#33780) 2019-06-03 13:16:14 -07:00
Jonah Williams
cd1d40a7c9
Revert "Add web safe indirection to Platform.isPlatform getters (#33406)" (#33776)
This reverts commit d92b3b40d2113a216bdfd7c2c69d9d0f4d905a0d.
2019-06-03 11:08:30 -07:00
Jonah Williams
d92b3b40d2
Add web safe indirection to Platform.isPlatform getters (#33406) 2019-06-03 10:55:36 -07:00
SimonIT
683238e82a Fix disabled CupertinoTextField style (#32974) 2019-06-03 10:34:47 -07:00
Todd Volkert
306a09a384
Update consolidateHttpClientResponseBytes() to use compressionState (#33729)
This updates to use the new HttpClientResponse.compressionState
API that was recently added in the SDK.

https://github.com/flutter/flutter/issues/32374
2019-06-03 09:50:21 -07:00
Michael Goderbauer
ae23d4a490
Transform PointerEvents to the local coordinate system of the event receiver (#32192) 2019-05-31 16:48:50 -07:00
Todd Volkert
56940b544f
Update FadeInImage to use new Image APIs (#33370)
This updates FadeInImage to use the new Image.frameBuilder
API (added in #33369), to greatly simplify the implementation
of FadeInImage.

This also removes the FadeInImage.placeholderSemanticLabel property.
This property was added in #28799 for the sake of completeness (the bug
it fixed was the lack of any semantic label support in FadeInImage), but a
placeholder is a transient visual artifact, not something that affects the
underlying semantic meaning of the image.
2019-05-31 14:42:48 -07:00
Tong Mu
0f2254a5c3
ModalRoute resumes previous focus on didPopNext (#33152)
This PR changes ModalRoute so that, when the route on top of it is popped, it requests to focus on the last focus.
2019-05-31 14:15:20 -07:00
Justin McCandless
d963e4fe35
Text selection handles are sometimes not interactive (#31852)
The text selection handles now feel a lot more responsive, and their implementation was cleaned up a bit.
2019-05-30 12:31:18 -07:00
Todd Volkert
cba41ca2ec
Remove assert from Image._handleImageFrame() (#33602)
Tickers being disabled and re-enabled can cause the
condition of a synchronous notification happening after
image frames have been delivered, which is valid in that
case. As such, this removes the assert.

https://github.com/flutter/flutter/issues/32374
2019-05-30 12:04:01 -07:00
Gary Qian
2cb5b24b02
Fix text scaling of strut style (#33462) 2019-05-30 10:13:17 -07:00
Tong Mu
fa3fbc89a3
Material allows "select all" when not collapsed (#32950)
This PR enables "Select all" on MaterialTextSelection when text is partially selected.
2019-05-30 10:03:31 -07:00
Greg Spencer
07aede4c31
Fix onExit calling when the mouse is removed. (#33477)
This PR solves two problems: currently, the onExit is called for a mouse pointer the moment the removal message is received, except that by the time it actually calls it, there is no _lastEvent for it in the mouse tracker (it's already been removed), resulting in an event being passed to the onExit that contains nulls for the position. Also, removePointer events don't actually get created with a position, although they easily could be, so that even the the _lastEvent in the mouse tracker were still populated, it would still give a null position and delta.

This PR adds support for the position and delta in a PointerRemovedEvent, and populates them. In addition, when a remove event is received, it doesn't actually remove the pointer until the mouse position check that gets scheduled actually happens.
2019-05-30 09:55:38 -07:00
chunhtai
bfc6df0e4f
fixed 33347 fill the gap during performLayout in SliverGrid and SliverFixedExtentList (#33467) 2019-05-30 09:24:02 -07:00
Jonah Williams
6feedcc6a4
use toFixedAsString and DoubleProperty in diagnosticProperties (#33488) 2019-05-30 08:57:10 -07:00
LongCatIsLooong
22ea031e28
Fix ScrollbarPainter thumbExtent calculation and add padding (#31763)
- Fixed extentInside calculation in ScrollMetrics
- Added asserts to extentInside getter, as well as ScrollPosition.applyContentDimensions to enforce minScrollExtent <= maxScrollExtent
- Added padding to ScrollbarPainter, updated implementation. Took care of some edge cases.
- Changed some scroll bar constants on Cupertino side.
2019-05-29 16:52:21 -07:00
Darren Austin
252a14ba2f
Fixed for DropdownButton crashing when a style was used that didn't include a fontSize (#33474)
Fixed an issue with a DropdownButton crashing when a style was used that didn't include a fontSize.
2019-05-29 13:18:34 -07:00
Todd Volkert
6884146925
Add loading support to Image (#33369)
This adds two new builders to the `Image` class:

* `frameBuilder`, which allows callers to control the widget
  created by an [Image].
* `loadingBuilder`, which allows callers fine-grained control
  over how to display loading progress of an image to the user.

`FadeInImage` can be simplified by migrating to the new API.
This is done in a follow-on commit.

https://github.com/flutter/flutter/issues/32374
2019-05-29 12:52:05 -07:00
Jonah Williams
2d9b158faf
Revert "Framework support for font features in text styles (#33230)" (#33444)
This reverts commit 841286d652379a6e9f1e95d54c8c9e628f4f1d5c.
2019-05-28 11:35:03 -07:00
Harry Terkelsen
13e9bfcc94
Add binaryMessenger constructor argument to platform channels (#30406)
* Deprecates `BinaryMessages` in favor of a default instance of `BinaryMessenger`, called `defaultBinaryMessenger`
* Platform channels use the `defaultBinaryMessenger` for their binaryMessenger default argument.
2019-05-28 11:18:22 -07:00
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