Commit Graph

10171 Commits

Author SHA1 Message Date
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