Commit graph

10387 commits

Author SHA1 Message Date
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
Emmanuel Garcia faec4ca361
Instrument add to app flows (#33297) 2019-05-28 11:11:20 -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
Luiz Dubas 841e1cf0af Add mustRunAfter on mergeAssets task to force task ordering (#33272)
Co-authored-by: Miguel Lemos <miguelslemos@gmail.com>
2019-05-28 10:01:19 -07:00
Jonah Williams a656bcf54f
rename test file that misnamed (#33361) 2019-05-28 09:56:13 -07:00
Yegor 8217f4bc8c
remove Layer.replaceWith due to no usage and no tests (#33164) 2019-05-28 09:55:32 -07:00
Kate Lovett 20c31e7ac3
Sample Code & Animation for Flow Widget (#31929)
* Adding sample and animation for Flow widget

* Updated dart templates for layout in API docs

* Updated the sample code for a clearer example.

* make clean
2019-05-28 09:30:16 -07:00
Todd Volkert 323373d333
Add blank newline after Dartdoc bulleted list. (#33403)
This also fixes up some indentation in some
bulleted lists.

https://github.com/dart-lang/dartdoc/issues/1969
2019-05-27 12:27:28 -07:00
Todd Volkert ddef473e07
Add clarification in Animation's listener API docs (#33363) 2019-05-27 10:17:09 -07:00
Jonah Williams 75d75bfaec
fix relative paths and snapshot logic in tool (#33283) 2019-05-25 19:47:17 -07:00
Jonah Williams 582c5587cd
make sure we build test targets too (#33284) 2019-05-25 19:46:44 -07:00
stuartmorgan 81c38b22cb
Implement macOS support in flutter doctor (#33277)
Splits Xcode validation out of the iOS validator and into a stand-alone
validator, and groups the CocoaPods validator with that top-level
validator instead of the iOS validator. iOS now validates only the
iOS-specific tools (e.g., ideviceinstaller).

Reorganizes many of the associated clases so that those that are used by
both macOS and iOS live in macos/ rather than ios/. Moves some
validators to their own files as part of the restructuring.

This is the macOS portion of #31368
2019-05-24 22:51:02 -04: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
stuartmorgan 0f6e4e6190
Add macosPrefix to the pubspec schema for plugins (#33287)
Adds a new macosPrefix, which serves the same purpose as iosPrefix but
for macOS plugins.

It is not yet used by the tooling, but this allows for plugins to start
to be written using it in preparation for tooling support for plugins.

Part of #32718
2019-05-24 15:39:48 -04: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
Shi-Hao Hong 73798a1592
Explain hairline rendering in BorderSide.width docs (#33226) 2019-05-24 09:04:21 -07:00
Zachary Anderson f5827f0f07
[flutter_tool] Improve Fuchsia 'run' tests (#33263) 2019-05-24 07:48:41 -07:00
Jonah Williams 7ec9a6fa72
no longer necessary with ddc fix (#33271) 2019-05-23 23:49:41 -07:00
Emmanuel Garcia 12a0e475e2
Make paths absolute in settings.gradle (#33228) 2019-05-23 23:32:11 -07:00
Jonah Williams 1bd85dd6c2
disable flaky devfs test (#33285) 2019-05-23 17:05:29 -07:00
Todd Volkert c6129b4e85
Add cast to prepare for package:file update (#33268) 2019-05-23 12:33:24 -07:00
Todd Volkert bc7bc94083
Slight clarification in the ImageCache docs (#33195)
It was easy to miss the reference to the top-level `imageCache`
property before.  This calls out the property a little more
explicitly.
2019-05-23 10:29:07 -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
Devon Carew 0e8720e926
use the --disable-server-feature-completion cli arg to the analysis server (#33232) 2019-05-23 07:48:23 -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
stuartmorgan ef9866bf27
Build macOS via workspace, rather than project (#33198)
This is necesasry to integrate CocoaPods, since CocoaPods operates
primarily on the workspace rather than the project.
2019-05-22 19:58:29 -04:00
Jonah Williams a30ffb60ad
Revert "Clean up some flutter_tools tests and roll dependencies (#33163)" (#33206) 2019-05-22 12:20:02 -07:00
Jason Simmons a6f1c095dc
Engine roll 75963dbb0ba6..64f18f2cb686 (#33157) 2019-05-22 10:19:08 -07:00
Emmanuel Garcia dc28ba8919
Remove colon from Gradle task name since it's deprecated (#33191) 2019-05-22 09:58:08 -07:00
Ian Hickson e5f81e1048
Clean up some flutter_tools tests and roll dependencies (#33163)
* Clean up some flutter_tools tests

* Remove arbitrary retry that happens even for fundamental errors, and generally clean up _DevFSHttpWriter.

* Update dependencies (requires fixes; see next commit)

* Fixes for new dependencies.
2019-05-22 09:31:37 -07:00
Zachary Anderson 2eee3f3283
[flutter_tool] Don't look for Fuchsia artifacts on Windows (#33146) 2019-05-21 16:12:27 -07:00
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
Christopher Fujino 041755faad
don't send crash reports if on a user branch (#33078)
* don't send crash reports if on a user branch.
* add test to test/crash_reporting_test.dart
2019-05-21 11:58:41 -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
Zachary Anderson 94ce956f0a
[flutter_tool] Adds support for 'run' for Fuchsia devices (#32849) 2019-05-21 08:49:43 -07:00
Shi-Hao Hong 3265e15925
SliverAppBar shape property (#33073) 2019-05-21 08:30:58 -07:00
Michael Thomsen 7ae3caf309
Rename flutter packages to flutter pub (#33041) 2019-05-21 16:38:58 +02: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 60a1b2b9ea.
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 069303d46f.
2019-05-20 13:30:41 -07:00
Emmanuel Garcia 90f38907d7
Support ARM 32 and 64 bits in app bundles 2019-05-20 13:09:20 -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
xster 51799d3190
Cupertino localization step 12 try 2: push translation for all supported languages (#32513) 2019-05-19 04:10:34 -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
Todd Volkert 1f2972c7b6
Prepare for API addition to HttpClientResponse (#32834)
https://github.com/dart-lang/sdk/issues/36971
2019-05-17 10:44:08 -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
Devon Carew 50a9c31f5e
reduce retry attempts for flutter creatte --list-samples (#32833) 2019-05-16 18:20:30 -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
stuartmorgan f8b07e230a
Change the way macOS app names are located (#32706)
Instead of requiring a name_output.sh, expect a file called
.app_filename in the macos/Flutter directory containing just the name of
the application. The expectation is that the Xcode build will create
that file with a script.

This is not intended as a long-term solution, but it's a substantial
improvement over name_output.sh:
- name_output.sh required constructing the full build output path; this
  made sense when it was coupled with build.sh, but now that the
  decision for where build output goes lives in flutter_tool, that logic
  should as well.
- Changing the name of the application required also updating
  name_output.sh, which is error-prone. With .app_filename, it can be
  created using $PRODUCT_NAME, which means that the usual way of setting
  the application name will automatically update this flow as well.

Part of #30706
2019-05-16 11:00:05 -04:00
stuartmorgan 4e1bfca847
Streamline Windows build process (#32783)
Allows Windows builds to use the same structure and script as Linux
builds now use, calling into tool_backend to manage copying resources to
the project directory and building the bundle.

Also switches from expecting name_update.bat to expecting flutter\exe_filename
to be written during the build, as with the recent changes to the macOS build, to
reduce the amount of boilerplate needed in a windows\ project directory.
2019-05-15 19:32:47 -04: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
Tong Mu 20299a2c17
Add buttons customization to WidgetController and related testing classes (#31095)
* Add buttons to WidgetController and TestPointer

* Add more buttons

* Let TestPointer handle default device

* Use getter only buttons
2019-05-15 15:42:03 -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
stuartmorgan 6722fb448c
Teach flutter msbuild for Windows (#32335)
Eliminates the need for a build.bat in the Windows build workflow, adding
preliminary support for building using msbuild. The handling of
vcvars64.bat may be refined in the future, but this serves as a starting point.
2019-05-14 19:24:40 -04:00
Dan Field 6d4b0abfa8
Ignore some JSON RPC errors (#32710) 2019-05-14 16:04:04 -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
Zachary Anderson 8841afeb1f
[flutter_tool] Build a Fuchsia package (#32519) 2019-05-14 10:59:23 -07:00
Kate Lovett 054d9bb2f1
Updating dart.dev related links (#32641)
* Updating dart.dev related links

* Update packages/flutter_tools/lib/src/base/context.dart
2019-05-14 10:35:00 -07:00
Mouad Debbar ef5abcc6bf
Revert "Show/hide toolbar and handles based on device kind (#29683)" (#32702)
This reverts commit 18ca37542d.
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
Jason Simmons f5cf209a66
Remove appbundle build steps that are required for APKs but not AABs (#32515)
Some parts of the appbundle build process were based on the logic for building
APK packages.  However, these steps (copying to a directory shared by all
build variants, and calculating a SHA) are not necessary for an appbundle.
2019-05-13 15:36:47 -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 549b412656.
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
Danny Tuppeny b76a1e8312
Comment out .vscode/ in gitignore for templates (#32404) 2019-05-13 09:06:30 +01:00
stuartmorgan 710a0cb9a5
Adjust macOS build flow (#32538)
- Removes SYMROOT from the Generated.xcconfig. Having it causes current
  versions of Xcode to switch the project's build output to "Legacy",
  which causes anything not overridden to use a project-relative build
  directory instead of a shared directory in DerivedData, breaking
  anything with subprojects that it depends on.
  This means that `flutter run` and builds from Xcode will use
  completely different build directories, but that each should be
  internally consistent.
- Moves the FlutterMacOS.framework to $SRCROOT/Flutter. This is
  consistent with the approach we're moving to for all desktop
  platforms, and avoids issues finding it now that SYMROOT doesn't match
  for the two different build modes.

Fixes #32494
2019-05-11 21:12:42 -04:00
Jonah Williams 8b0243f413
Teach Linux to use local engine (#31631) 2019-05-11 00:08:29 -07:00
Kate Lovett 829bdeb426
Fixing accidental merge from WIP branch. (#32520)
Revert "Merge branch 'master' into master"

This reverts commit e3a03c04c4, reversing
changes made to 6474982649.
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
Michael Goderbauer b37c3be0fa
Add ancestor and descendant finders to Driver (#32410) 2019-05-10 18:21:19 +02: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
Efthymis Sarmpanis b24f1f78a7 Add breadcrumbs to TextOverflow (#32328) 2019-05-10 13:29:31 +02:00
Michael Goderbauer 8cf65526e7
everything const (#32380) 2019-05-10 13:29:03 +02:00
xster 87d9c553f4
Revert "Cupertino localization step 12: push translation for all supported languages (#31644)" (#32470)
This reverts commit 10922df68e.
2019-05-10 01:08:59 -07:00
xster 10922df68e
Cupertino localization step 12: push translation for all supported languages (#31644) 2019-05-09 23:18:56 -07:00
xster 1ac813a5e6
Cupertino localization step 10: update the flutter_localizations README (#30224) 2019-05-09 23:17:43 -07:00
Hans Muller 6d0e235cf8
Support for replacing the TabController, after disposing the old one (#32434) 2019-05-09 22:02:46 -07:00
Greg Spencer d2fe08628d
Implements FocusTraversalPolicy and DefaultFocusTraversal features. (#30076)
This implements a DefaultFocusTraversal widget to describe the focus traversal policy for its children, defined by a FocusTraversalPolicy object from which custom policies may be created. Pre-defined policies include widget-order traversal, "reading order" traversal and directional traversal.
2019-05-09 20:24:23 -07:00
Sam Rawlins 9c77e8e8a0 Fix missing return statements on function literals (#31825) 2019-05-09 12:43:51 -07:00
Greg Spencer 66a6726306
Fix benchmark regression in layer.find<S>(Offset) (#32425)
This fixes a benchmark regression introduced in #32350. The performance is improved by just reverting the Layer.find<S> routines to use their old definitions, instead of defining them in terms of the findAll<S> lazy iterators.

Fixes #32387
2019-05-09 12:25:52 -07:00
Phil Quitslund 3a6acb8c25
More const conversions (#32408)
* update immutable to const

* => const lists

* revert making list const

* make Centers const
2019-05-09 09:23:30 -07:00
Jonah Williams 4d3b51e284
Allow flutter web to be compiled with flutter (#32360) 2019-05-09 08:57:26 -07:00
stuartmorgan e8c5c98132
Fix assignment in macos_build_flutter_assets.sh (#32406)
Bash assignment doesn't have spaces around '='.

Fixes #32341
2019-05-09 10:16:30 -04:00
Phil Quitslund d96c1c88b7
make immutables const (#32340)
* make immutables const
2019-05-09 05:47:01 -07:00
Michael Goderbauer 1621baafc7
Introduce separate HitTestResults for Box and Sliver (#31894) 2019-05-09 10:00:01 +02:00
Michael Goderbauer ff1dbcdeb6
Add geometry getters to Flutter Driver (#32302) 2019-05-09 09:50:02 +02:00
Greg Spencer aeccd6a8bc
Fix nested listeners so that ancestor listeners can also receive enter/exit/move events. (#32350)
This changes Listener to trigger enter/move/exit in all Listeners below the pointer, not just the leaf region (the first region hit). This is because we need to allow listeners to be nested so that, say, a widget that handles changing color on hover, but also is wrapped in a Tooltip (that handles hover) can trigger both actions, not just one.

To that end, I added a findAll to Layer, similar to the existing find method that was previously used. It returns an iterator over annotated layers which match the given data type.

Since the findAll is implemented as returning an Iterable (and is sync*), I re-implemented the find routines as just returning the first result from findAll, since that should be just as efficient, and would then prevent duplication in the implementation.
2019-05-08 17:57:42 -07:00
Greg Spencer 23baae0e45
Fix RenderPointerListener so that callbacks aren't called at the wrong time. (#32142)
I recently added some code to keep hover events from being propagated when a mouse wasn't attached. While that works, there are times when it can fire callbacks during the building of other components, since they can now be called from detach/attach. This is not ideal, since it will assert then. This changes the code so that it won't update the annotations during attach/detach, but also won't push the annotation layer unless a mouse is connected, achieving the same result as before, but with better semantics.

The basic problem is that in the detach for RenderPointerListener, it would detach the annotation, which could cause onExit to be called on the annotation, since the widget was disappearing under the mouse, and thus needs to receive an onExit, but that onExit might be (and probably will be) calling setState, which marks the owning widget as needing to be built, sometimes when it already has been.

The fix creates a new _ListenerElement that overrides activate and deactivate in order to tell the render object ahead of the detach that it might be detached, and so the onExit gets called before the detach instead of during it.

In addition, I now avoid scheduling more than one check for mouse positions per frame.
2019-05-08 12:20:31 -07:00
Matthew Lloyd 969c6ef1dc Add reference to Runner-Bridging-Header.h to iOS template's profile configuration (#32266) 2019-05-07 23:59:01 -07:00
chunhtai 21efdff8a5
fix issue 32212 Text field keyboard selection crashes (#32256) 2019-05-07 15:07:11 -07:00
xster aa450d5660
Cupertino localization step 9: add tests (#29954) 2019-05-07 11:47:59 -07:00
Jonah Williams eb996afaa8
make hotfix use a plus instead of minus (#32060) 2019-05-07 10:11:00 -07:00
Shi-Hao Hong 2f1e7cf662
Added state management docs/sample to SwitchListTile (#32147)
* Added documentation to SwitchListTile
2019-05-07 08:33:22 -07:00
Ian Hickson f61a2c3907 Clean up flutter_test/test/controller_test.dart (#31333)
Instead of using a custom WidgetController, which is very brittle, we just use the usual infrastructure.

Also, use structured data instead of an array.

This adds offsetMoreOrLessEquals to handle small floating point errors in offsets.
2019-05-06 14:36:30 -07:00
Ian Hickson b770cdf267
Revert "Add shape property to SliverAppBar (#31662)" (#32155)
This reverts commit 28b58db1f2.
2019-05-06 12:02:02 -07:00
Michael Klimushyn fecba55888
Remove deprecated decodedCacheRatioCap (#32041) 2019-05-06 11:19:35 -07:00
yaheng 57d6666462 Fix text selection toolbar appearing under obstructions (#29809) 2019-05-06 11:18:09 -07:00
Emmanuel Garcia cc7ec6d624
Bump multicast_dns version 2019-05-06 11:14:41 -07:00
Tiziano Munegato 28b58db1f2 Add shape property to SliverAppBar (#31662) 2019-05-06 10:34:37 -07:00
Darren Austin 017997b9c1
Increase size of touch regions in the Time Picker header (#32053)
- Increased the AM/PM, minute and hour buttons to at least 48x48
- Added InkWells to all of them
- Adjusted the landscape layout for the AM/PM buttons to be horizontal
- Added a test to ensure the regions are at least 48x48
2019-05-06 10:27:16 -07:00
Darren Austin 2d2edbf70b
Date picker layout exceptions (#31514)
Fixed several layout issues with the material date picker. Mostly just removed hard coded sizes to allow the grid view to scroll instead of overflowing.
2019-05-06 10:26:26 -07:00
Zachary Anderson 61236c873e
[flutter_tool] In 'attach' use platform dill and patched sdk dir from the Fuchsia SDK (#32071) 2019-05-06 09:26:58 -07:00
Jonah Williams dd5d0d6c36
rename foreground and background to light and dark (#32070) 2019-05-06 08:02:08 -07:00
Jonah Williams 99e7b0a0ff
dont NPE with empty pubspec (#32072) 2019-05-06 08:01:45 -07:00
Antti Ahti 526113db32 Fix tab indentation (#31798)
Code indentation was done with tabs in some places. Replaced with spaces.
2019-05-06 14:09:54 +02:00
Michael Goderbauer cc239580d3
Make Hover Listener respect transforms (#32025) 2019-05-06 13:36:13 +02:00
Michael Goderbauer ea03ac2b84
Revert "Sliver animated list (#28834)" (#32135)
This reverts commit d2de911d50.
2019-05-06 11:53:32 +02:00
Simon Binder d2de911d50 Sliver animated list (#28834) 2019-05-06 11:26:38 +02:00
LongCatIsLooong 8800153468
Fix CupertinoSliverRefreshControl onRefresh callback (#32086)
Replace CupertinoSliverRefreshControl.onRefresh's then callback with whenCompleted callback, so when onRefresh completes with error the sliver refresh control retracts like when it completes with value.
2019-05-04 15:54:44 -07:00
Shi-Hao Hong 2f75005a16
Fix Exception on Nested TabBarView disposal (#31581)
* Add Flag to determine if pixels is set by viewport during disposal

* Add TODO to remove nested TabBarView workaround once unnecessary build/dispose issues are resolved
2019-05-04 09:14:49 -07:00
done d53115ab2e fix FlutterDriver timeout (#31824) 2019-05-04 06:13:25 -07:00
Jonah Williams 6a250c8d65
update packages and unpin build (#32066) 2019-05-03 16:54:35 -07:00
Hans Muller 73957b94e7
Test Material buttons against a11y contrast guidelines (#32050) 2019-05-03 16:13:42 -07:00
Greg Spencer 11e0a725d4
Re-land: Add support for Tooltip hover (#31699)
This is a re-land of #31561, after fixing performance regressions.

Added change listening to the MouseTracker so that the Listener and tooltip can react to whether or not a mouse is connected at all. Added a change check to make sure Listener only repaints when something changed.

Fixes #22817
2019-05-03 13:00:36 -07:00
Gary Qian 3bd1737c0e
Partially Rollback caret change for Android (#32043) 2019-05-03 12:32:04 -07:00
Justin McCandless 0a3df1b576
Text wrap width (#31987)
Add `textWidthBasis` param to Text to allow calculating width according to longest line.
2019-05-03 11:41:07 -07:00
Furkan Tektas 299ce6e373 Cupertino Turkish Translation (#32013) 2019-05-03 11:03:25 -07:00
chunhtai 38808d9fe4
Reland fix 25807 implement move for sliver multibox widget (#31978) 2019-05-03 09:48:20 -07:00
Efthymis Sarmpanis 39d660be78 Extract TODO comment from Image.asset dardoc (#31903) 2019-05-03 08:29:02 -07:00
Efthymis Sarmpanis d095b05522 Updated primaryColor docs to refer to colorScheme properties (#31902) 2019-05-03 08:28:16 -07:00
Tong Mu 7beb09e76a
Redo "Remove pressure customization from some pointer events" (#30874)
* Revert "Revert "Remove pressure customization from some pointer events (#30414)" (#30873)"

This reverts commit f34c2ef0a3.

* Revert pressure removal of PointerUpEvent

* Replace PR with an issue

* Add tests for fromMouseEvent
2019-05-02 23:05:01 -07:00
Zachary Anderson 3d276cc6a8
[flutter_tool] Pull the right Fuchsia SDK for the platform (#31998) 2019-05-02 15:26:59 -07:00
MH Johnson a40e5c90f0
[Material] selected/unselected label styles + icon themes on BottomNavigationBar (#31018)
* add text style params

* add icon theme params

* Added tests
2019-05-02 18:20:16 -04:00
Kate Lovett 4676c66b9a
Merge branch 'gold' into master 2019-05-02 15:01:35 -07:00
Jonah Williams 1d91bd2583
Revert "Start abstracting platform logic builds behind a shared interface (#31889)" (#32003)
This reverts commit e5459942c8.
2019-05-02 14:14:46 -07:00
Jonah Williams e5459942c8
Start abstracting platform logic builds behind a shared interface (#31889) 2019-05-02 13:31:00 -07:00
Kate Lovett 80344acaaa
Comma Comma Nit Nit 2019-05-02 12:56:31 -07:00
chunhtai caebdaf1e8
fix issue 30526: rounding error (#30979) 2019-05-02 12:42:25 -07:00
Hans Muller 4230e9674c
Simplify drawer scrimColor defaults, update tests (#31947) 2019-05-02 11:57:01 -07:00
Justin McCandless 34325ba33a
Revert "Tight Paragraph Width (#30988)" (#31979)
This reverts commit 323108ff47 due to weird engine dependency bug
2019-05-02 10:36:51 -07:00
Justin McCandless 323108ff47
Tight Paragraph Width (#30988)
Add `textWidthBasis` param to Text to allow calculating width according to longest line.
2019-05-02 09:21:45 -07:00
James Lin 0c20a2ed01 Fix MediaQueryData.toString() to generate readable output
MediaQueryData.toString() omitted commas and spaces around some
properties, making the output difficult to read.
2019-05-02 08:44:51 -07:00
Todd Volkert f48cc4611a
Add documentation to Navigator (#31851) 2019-05-02 08:02:11 -07:00
Jonas Termansen 8b9eb3e2b2 Report CompileTime metric in flutter build aot --report-timings. (#31895)
This is the correct metric to report for compilation time benchmarks rather
than RunTime. Rename the 'gen_snapshot' value to merely 'snapshot' for
backwards compatibility and overall simplicity.

This change simplifies Dart's benchmarking of Flutter by making it easier to
adopt --report-timings (made for Dart to use), which makes the benchmarks
much more robust.
2019-05-02 15:22:43 +02:00
Jonah Williams 83aa065f6a
Add commands to swap dart imports for local development (#31925) 2019-05-02 01:14:15 -07:00
Jacob Richman e17f9e8ff8
Fix bug handling cyclic diagnostics. (#31960) 2019-05-01 22:09:53 -07:00
LongCatIsLooong 15f187fce0
Add docs to AppBar (#31317)
- Added docs to AppBar to cover AppBar's inherited MediaQuery when not used in a Scaffold in general
- s/Hero]s/Hero]es/
2019-05-01 20:39:37 -07:00
Dan Field 5b2281e747
Make Flex only overflow on epsilon (#31890) 2019-05-01 17:28:33 -07:00
Shi-Hao Hong 8959caa239
Update scrimDrawerColor with proper const format (#31938) 2019-05-01 15:18:08 -07:00
Diego Velásquez López d8bb880d08 added scrimColor property in Scaffold widget (#31025) 2019-05-01 14:50:52 -07:00
Shi-Hao Hong 7690bb47dc
Add Horizontal Padding to Constrained Chip Label Calculations (#31861)
* Add horizontal padding and properly constrain chip label calculations

* Added regression test for avatar, label and delete icon constraint
2019-05-01 13:46:36 -07:00
Dan Field df669ab1ea
Avoid NPE for flutter attach mDNS (#31926) 2019-05-01 13:41:00 -07:00
Zachary Anderson 6a69f8c98c
[fuchsia] Add support for the 'device' command using the SDK (#31910) 2019-05-01 13:24:09 -07:00
Jonah Williams 06973f58a7
Revert "Revert "fix edge swiping and dropping back at starting point (#31623)" (#31876)" (#31923) 2019-05-01 12:53:04 -07:00
Shi-Hao Hong 0c871b8528
Improve RadioListTile Callback Behavior Consistency (#31574) 2019-05-01 12:52:52 -07:00
Greg Spencer be75fb36c5
Change unfocus to unfocus the entire chain, Fix setFirstFocus (#31909)
In #31614, I added an unfocus() to FocusNodes to allow giving up of focus, but it only worked on the primary focus. This changes that so that it will unfocus the entire chain, not just the primary focus. Now, if you call unfocus() on a FocusNode or FocusScopeNode, and their hasFocus returns true, then after calling unfocus(), it will return false. Before this change, it would only do that if hasPrimaryFocus was also true.

This also fixes a bug in the way setFirstFocus was implemented, making it conform more to the behavior of the previous implementation. It has simplified logic in reparent, and in when it requests focus for scope nodes that have had setFirstFocus called on them.
2019-05-01 12:20:41 -07:00
Jacob Richman 63aa5b3647
Refactor core uses of FlutterError. (#30983)
Make FlutterError objects more structured so they can be displayed better in debugging tools such as Dart DevTools.
2019-05-01 11:20:12 -07:00
Todd Volkert 3d09f939ba
Make Gradle error message more specific (#31850) 2019-05-01 10:28:57 -07:00
Victor Maraccini 74c6237abc Fix bundle id on iOS launch using flutter run (#31039) 2019-05-01 10:21:43 -07:00
rami-a 6a1468db16
Add BottomSheetTheme to enable theming color, elevation, shape of BottomSheet (#31318)
* Introduce BottomSheetTheme and shape support for bottom sheet

* Add bottom sheet theme to ThemeData. Use theme in bottom sheet build

* Expose color, elevation, shape to showModalBottomSheet helper

* Expose color, elevation, shape to showBottomSheet helper

* Address PR feedback

* Address PR feedback

* Address additional PR feedback
2019-05-01 13:10:50 -04:00
Jonah Williams 60a1b2b9ea
Revert "Redo: Add buttons to gestures (#31819)" (#31912)
This reverts commit fea2c7d671.
2019-05-01 10:06:45 -07:00
Emmanuel Garcia 3e65bb060f
Fix #31764: Show appropriate error message when fonts pubspec.yaml isn't iterable
Show appropriate error message when fonts isn't iterable
2019-05-01 09:49:39 -07:00
Dan Field a8504405a8
Revert "Handle notification errors (#31868)" (#31886)
This reverts commit c0d5fd23ab.
2019-04-30 23:27:30 -07:00
Jonah Williams c82fc132a8
add stderr to log processor for desktop (#31874) 2019-04-30 19:18:15 -07:00
Gary Qian 4102486d63
Center iOS caret, remove constant offsets that do not scale (#31687) 2019-04-30 17:41:01 -07:00
chunhtai e2dfd73c2e
only build asset when there is asset declared in pubspec (#31804) 2019-04-30 16:03:47 -07:00
Jonah Williams 514fb2c7c0
Revert "fix edge swiping and dropping back at starting point (#31623)" (#31876) 2019-04-30 15:44:09 -07:00
Dan Field 4bc35fc87a
Allow DSS to be dragged when its children do not fill extent (#31832)
* Allow DSS to be dragged when its children do not fill extent

* Fix when maxChildSize  < 1.0
2019-04-30 15:42:42 -07:00
Dan Field c0d5fd23ab
Handle notification errors (#31868) 2019-04-30 15:42:22 -07:00
Jonah Williams 5e77d6508e
Initial sketch of tools testbed (#31765) 2019-04-30 15:42:16 -07:00
Jonah Williams 48936d9a95
Remove deprecated commands (#31759) 2019-04-30 14:43:03 -07:00
liyuqian fb87619143
Fix prefer_const_constructors (#31860)
This will fix our flutter build post-submit analyze test

Merge on red to fix flutter build
2019-04-30 10:38:26 -07:00