6634 Commits

Author SHA1 Message Date
Brenton Simpson
58163e0c39 Rename springConstant to stiffness (#11686)
`stiffness` is the name of a spring's `k` input on [iOS](https://developer.apple.com/documentation/quartzcore/caspringanimation), [Android](https://developer.android.com/topic/libraries/support-library/preview/spring-animation.html), and the [Web](bbc0f831e2/src/index.js (L11-L22)).  To ensure the API is familiar to and easily understood by developers coming from other platforms, Flutter should follow this convention as well.

This is a minimally-breaking change.  Across [all of GitHub](https://github.com/search?l=Dart&q=springConstant&type=Code&utf8=%E2%9C%93), there are only 2 uses of the `springConstant` API (in Mondrian).  Those can be easily changed to use this name.

Closes #11684
2017-08-23 12:58:33 -07:00
Michael Goderbauer
f969b777b5 a11y and scrolling with slivers (#11711)
* refactor to assembleSemanticNode

* ++

* cleanup

* fix test

* add note

* review comments

* review feedback

* import fix

* another import fix

* refactor to ensure tag

* tests, tests, tests

* analyzer fixes

* review comments
2017-08-23 12:36:32 -07:00
Chris Bracken
b4f6e56720 Include main entrypoint in FLX snapshot checksum (#11762)
During FLX snapshotting, changes to (or absence of) any of the following
should trigger re-snapshot:

  1. main() entrypoint source
  2. transitive closure of sources reachable from the entrypoint source
  3. the output snapshot
2017-08-23 12:10:52 -07:00
Chris Bracken
dc5d2937bb Suppress libmobilegestalt noise from iOS device logging (#11745)
This patch supports basic filtering of log lines from physical iOS
devices, similar to existing functionality for iOS simulator logging.

This patch also suppresses the following two log messages which are
emitted at app startup on iOS 10.3 devices:
  libMobileGestalt MobileGestaltSupport.m:153: pid 123 (Runner) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
  libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
2017-08-23 10:50:07 -07:00
Ian Hickson
bf47b34b60 Directionality widget (#11739) 2017-08-23 10:34:20 -07:00
Ian Hickson
9d4dd10f63 Remove a bunch of useless global configuration options. (#11726)
These properties had a high cost in the documentation because they're
all top-level properties, and there's really very little reason for
these values to be configurable in the first place.
2017-08-23 10:33:41 -07:00
Jakob Andersen
5d0d6126a1 Add --template=<type> option to create command. (#11105)
Allows the user to specify the kind of project to create. The default is 'app'. Other choices are 'plugin' (the old '--plugin' behavior), and 'package'.

A Flutter 'package' is a Dart package that depends on Flutter, but does not contain native code.

Fixes #10377.
2017-08-23 13:29:31 +02:00
Mikkel Nygaard Ravn
32ab3dbee0 Support Xcode projects with no schemes (#11750) 2017-08-23 11:58:21 +02:00
Mikkel Nygaard Ravn
9496e6dfa7 Support for app flavors in flutter tooling, #11676 retake (#11734) 2017-08-23 10:55:35 +02:00
Jacob Richman
5066750063 Add comments to 3 methods that were missing comments. (#11737)
* Add comments to 3 methods that were missing comments.

Fix out of order (getter, private field, setter) tuple

* Code review fix.
2017-08-22 16:06:22 -07:00
Carlo Bernaschina
a8aff38811 Add log to understand flakiness of commands_test (#11720)
The flakiness of commands_test is generally visible via:

```
drive:stdout:   Expected: 'log: paint'
drive:stdout:     Actual: ''
drive:stdout:      Which: is different. Both strings start the same, but the actual value is missing the following trailing characters: log: paint ...
```

By returning the name of the test we will be able to understand if
another test is running by reading the `Actual` value
2017-08-22 09:54:51 -07:00
Mikkel Nygaard Ravn
7c3a45dc6e Revert "Support for app flavors in flutter tooling (#11676)" (#11729)
This reverts commit 8d07d3f652d687dfd80038371406fbe2942253a6.
2017-08-22 12:24:29 +02:00
Mikkel Nygaard Ravn
8d07d3f652 Support for app flavors in flutter tooling (#11676) 2017-08-22 10:38:23 +02:00
Devon Carew
f25e2f5213 Revert "fire service protocol events for frames (#11565)" (#11727)
This reverts commit 5f9acc4125ef74954493eb56feabd50be2817f68.
2017-08-22 01:06:48 -07:00
Devon Carew
4d0debd4c7 fix some call sites of printError (#11724)
* fix some call sites of printError

* review comments
2017-08-21 23:38:16 -07:00
Devon Carew
5f9acc4125 fire service protocol events for frames (#11565) 2017-08-21 22:12:19 -07:00
Jacob Richman
5462ddb917 Bare bones widget inspector support. (#10332)
Bare bones widget inspector support.

Toggle the widget inspector from the flutter tool by pressing 'i'.
When the widget inspector is select mode:
Pointer down to to inspect a widget.
Pointer click to finalize selection of a widget. You can now interact
with the application as you normally would but with the inspected widget
highlighted.
Click the inspect icon in bottom left corner of screen to reactivate
select mode.
2017-08-21 16:17:54 -07:00
Chris Bracken
9c04aa15b3 Fix a FormState documentation typo (#11712) 2017-08-21 15:54:02 -07:00
Carlo Bernaschina
6643db0106 Add documentation to waitForServiceExtension (#11708)
Addresses
3b4687bf69 (r134325222)
2017-08-21 14:16:30 -07:00
Carlo Bernaschina
937b98e1b9 Fix flakiness of commands_test (#11705)
- Wait for full Hot Reload
- Wait for full Restart
- Fallback if checkHealth throws METHOD_NOT_FOUND.
  We try to wait for the service extensions to be registered and retry.
2017-08-21 13:21:00 -07:00
Jacob Richman
4ce8c94e0d Use the phrase "must not be null" everywhere instead of "cannot be null" (#11683)
when describing non-nullable method arguments.
2017-08-18 13:37:31 -07:00
Carlo Bernaschina
272b0b956d Remove unnecessary closures (#11647)
Some widgets are using closures even if the only values that are
captured are this, context or widget, that can be accessed even from
methods of the State object.
2017-08-16 17:11:27 -07:00
Ian Hickson
0799ff5b6c Revert "Revert "Rollback patch that broke microbenchmarks" (#11641)" (#11645)
This reverts commit 1705bf3c7332f977e4f8a985a86e36251f7948a8.
2017-08-16 14:59:01 -07:00
Ian Hickson
1705bf3c73 Revert "Rollback patch that broke microbenchmarks" (#11641)
* Revert "Fix a typo in the saved certificate error message (#11640)"

This reverts commit bfda885a9de024b61c3279e7848cc91e8c81adc1.

* Revert "Rollback patch that broke microbenchmarks (#11616)"

This reverts commit 70fe6f4c232111d61187ea5c2b511bc4ebb339ca.
2017-08-16 14:46:50 -07:00
xster
bfda885a9d Fix a typo in the saved certificate error message (#11640) 2017-08-16 13:59:05 -07:00
Ian Hickson
70fe6f4c23 Rollback patch that broke microbenchmarks (#11616)
* Revert "Extract snapshotting logic to Snapshotter class (#11591)"

This reverts commit 309a2d78fbcd735b7594e3f65df809f52d46b23e.

* Revert "Minor whitespace formatting fix (#11590)"

This reverts commit bf69c3c69bde95779252e0deb3e288c8120aa1ec.

* Revert "Avoid rebuilding snapshots if no change to source (#11551)"

This reverts commit 74835db563b7c31b4c883eeea15e689a1bdbd303.
2017-08-15 17:53:58 -07:00
xster
946a28580c Add some doc about the page route's T type (#11627) 2017-08-15 15:38:42 -07:00
Jacob Richman
0c158d549e Cleanup DiagnosticsProperty documentation. (#11514) 2017-08-15 12:16:27 -07:00
xster
5f52457f1b Let android create template have an explicit flutter splash screen flag (#11622)
* Let android create template have an explicit flutter splash screen flag

* minor language tweak
2017-08-15 11:19:21 -07:00
Dan Rubel
3a31c35ba0 Rename .analysis_options to analysis_options.yaml (#11594) 2017-08-15 08:46:42 -04:00
xster
1ad4a088f1 Create template splash screens for Android and iOS (#11505)
* Add iOS template

* Android

* Let the engine reset the theme without the activity knowing

* Small tweak

* Replace assets with different vectors

* Let the template hookup have no actual image assets

* Add back placeholder assets with 1px transparent pngs

* Fix drawable xml

* clean up an extraneous line in the storyboard xml
2017-08-14 17:20:36 -07:00
xster
4cb3a98f2c [Discuss] Let the initial date picker mode be selectable (#11614)
* Let the initial date picker mode be selectable

* Doc for enum

* Add a test

* Add a comment for test

* actually decouple test from setup state
2017-08-14 14:54:23 -07:00
Mikkel Nygaard Ravn
3b8159564f Alpha post-roll work (#11608) 2017-08-14 20:28:34 +02:00
ameiyil
b156a0f054 Wrap the label widget of the Chip in a Flexible. (#11523) (#11554)
* Wrap the label widget of the Chip in a Flexible. (#11523)

* This allows the Chip to constrain the size of its content after taking into account the space occupied by the avatar and delete icon (if they are present)

* Adding unit tests to evaluate correct size constraints of the Chip widget's label. (#11523)

* Minor change in formatting.

* Adjust function formatting.
2017-08-11 22:01:40 -07:00
Chris Bracken
309a2d78fb Extract snapshotting logic to Snapshotter class (#11591)
First step in eliminating code duplication between script snapshotting
(in FLX build) and AOT, assembly AOT snapshotting.
2017-08-11 12:58:35 -07:00
Phil Quitslund
d264f39f95 Update project templates to use WEB_MODULEs. (#11587) 2017-08-10 16:54:44 -07:00
Chris Bracken
bf69c3c69b Minor whitespace formatting fix (#11590)
Adds some missing spaces.
2017-08-10 16:52:25 -07:00
xster
c9b0b3bb03 Fix iOS last up event velocity calculation - version 3 (#11571)
* Add synthesized property to pointer events

* test
2017-08-09 17:39:59 -07:00
Hans Muller
680d581db7 Correct handling of assets when no main asset is present (#11564) 2017-08-09 16:04:57 -07:00
xster
5ee8390e9c Let iOS back gesture listen to edge swipes only (#11559)
* Make iOS back gesture triggerable from the edge only.

* change to positioned
2017-08-09 12:35:05 -07:00
xster
2877dda572 Add a small doc suggesting usage pattern for setSystemUIOverlayStyle (#11558) 2017-08-09 12:27:11 -07:00
Jason Simmons
13dda7cf80 Signal an error in the dependency checker if an import URI is invalid (#11557)
Fixes https://github.com/flutter/flutter/issues/11539
2017-08-09 10:08:11 -07:00
Mikkel Nygaard Ravn
859d8d3830 Alpha pre roll (#11560) 2017-08-09 15:52:04 +02:00
Alexandre Ardhuin
8a88e2efca Bump Dart SDK to 1.25.0-dev.9.0 (#11509)
* Bump Dart SDK to 1.25.0-dev.9.0

* add link to sdk bug
2017-08-09 14:45:55 +02:00
Michael Goderbauer
3b76e7e258 Make tear-offs cacheable for RenderSemanticsGestureHandler (#11556)
* Make tear-offs cachable for RenderSemanticsGestureHandler

Fixes https://github.com/flutter/flutter/issues/11552

* comment fix

* refactor
2017-08-08 15:46:47 -07:00
Michael Goderbauer
1d9f834fb2 a11y: handle left/right scrolls correctly (#11309)
* a11y: handle left/right scrolls correctly

* fix keep alive test

* fix scaffold test
2017-08-08 14:42:17 -07:00
Michael Goderbauer
b551f53471 Don't trigger an assert when markNeedsSemanticsUpdate is called multiple times in edge cases (#11544)
* Don't trigger assert if a render object ceases to be a semantic boundary

This bug was exposed by https://github.com/flutter/flutter/pull/11309, which caused the following assertion to trigger when scrolling in the Animation demo:

```
The following assertion was thrown during _updateSemantics():
'package:flutter/src/rendering/object.dart': Failed assertion: line 2626 pos 16: 'fragment is
_InterestingSemanticsFragment': is not true.
```

A minimal reproduction of the bug can be found in `semantics_10_test.dart`, which has been added as a regression test for the bug by this PR.

Looking at that test, here is a description of the faulty behaviour:
1. During the second `pumpWidget` call `RenderExcludeSemantics` marks itself as needing a semantics update (due to excluding going from `false` -> `true`).
2. This causes the nearest ancestor with semantics information (here: `RenderSemanticsAnnotations` representing the "container" Semantics widget) to be added to the `_nodesNeedingSemantics` list.
3. `RenderSliverList` (implementation behind ListView) marks itself as needing a semantics update (due to its changing children).
4. This causes the `RenderSemanticsGestureHandler` to be added to the `_nodesNeedingSemantics` list.
5. Next, canDrag is updated from `true` -> `false`. This means, `RenderSemanticsGestureHandler` is no longer a semantics boundary, it marks itself as needing a semantics update.
6. The nearest ancestor with semantics (`RenderSemanticsAnnotations`, the "container") is added to the `_nodesNeedingSemantics` list (this is a no-op because it is already in the list).
7. During `flushSemantics`, the `_nodesNeedingSemantics` list is walked. The first entry (`RenderSemanticsAnnotations`) updates the semantics tree to only contain the container widget and drop everything else (= no children of the ExcludeSemantics widget are walked).
8. The second entry (`RenderSemanticsGestureHandler`) is updated. It does not add any semantics of its own and is no longer a semantics boundary. Therefore, it wants to merge its descendent semantics into its parents. Here is where the assert throws because the algorithm assumes that every entry in the `_nodesNeedingSemantics` list will produce and own an `_InterestingSemanticsFragment` (passing your semantics on to your parents is not interesting).

The problem here seems to be step 4 in combination with step 5. In step 4 we rely on the fact that `RenderSemanticsGestureHandler` is an (explicit or implicit) semantics boundary and that it will be able to absorb the semantics change of `RenderSliverList`. This is true
at this time. However, in step 4 `RenderSemanticsGestureHandler` decides to no longer be an (explicit or implicit) semantics boundary and our assumption from step 5 becomes incorrect. We did nothing to correct this assumption.

This PR removes a node, that could potentially cease to be a (explicit or implicit) semantics boundary from the `_nodesNeedingSemantics` list to fix that problem. Please node that this does not mean that the node's semantics will not be updated: The node's closest ances
tor with semantics is added to that list during the `markNeedsSemanticsUpdate` call. During `flushSemantics` we will walk from this node to update the semantics of it's children (if changed), which will include the node in question.

* tiny fix

* simplify test

* analyzer fixes

* review comments
2017-08-08 14:17:20 -07:00
Chris Bracken
74835db563 Avoid rebuilding snapshots if no change to source (#11551)
This change re-introduces skipping snapshot builds if input sources (and
outputs) have not changed since the last snapshot build, with a bugfix
to include the entry-point source in the checksum used to check whether
rebuild can be skipped. This ensures that the following sequence
invalidates the cached build, resulting in two snapshot builds:

  flutter build ios lib/foo.dart
  flutter build ios lib/bar.dart

This reverts commit 3d5afb5a81052b7d55661549320d6d43f893f448.
2017-08-08 10:52:24 -07:00
Michael Goderbauer
7edec88632 Allow tapping on TabBar indicator to switch tabs (#11525)
* Allow tapping on TabBar indicator to switch tabs

* fix semantics

* review comments
2017-08-08 10:14:35 -07:00
Hans Muller
9b3307a43b Add splashColor and highlightColor to IconButton (#11524) 2017-08-08 07:44:49 -07:00