Commit graph

9309 commits

Author SHA1 Message Date
Adam Barth 2b126bcd0d Add Alignment, which will replace FractionalOffset (#12342)
Unlike FractionalOffset, Alignment uses the center as the zero of the
coordinate system, which makes the RTL math work out much cleaner.

Also, make FractionalOffset into a subclass of Alignment so that clients
can continue to use FractionalOffset.
2017-10-01 23:06:18 -07:00
Ian Hickson 89566feeed Run pub with --trace (#12328)
See https://github.com/dart-lang/pub/issues/1714
2017-09-29 17:56:25 -07:00
Ian Hickson 21899ce62f Honor more of the Theme for CircleAvatar with backgroundColor (#12333) 2017-09-29 15:38:22 -07:00
gspencergoog f40d09e166 Fixing docs for testWidgets. No functionality change. (#12309)
* Fixing docs for testWidgets.  No functionality change.
2017-09-29 15:30:47 -07:00
Ian Hickson 944fef4564 Border.add, improve BorderSide.merge (#12327)
...and other minor Border improvements.
And tests.

This changes the merge logic I added yesterday to not support nulls
but instead support BorderSide.none and equivalents. This makes more
sense when dealing with actual Borders.
2017-09-29 15:20:17 -07:00
Todd Volkert ada593e8f7 Move assert into constructor body. (#12331)
Temporary workaround to the fact that the Analyzer API
doesn't have a way to turn on asserts in initializers, coupled
with the fact that this file is being parsed by package:intl
using the Analyzer API.
2017-09-29 15:16:21 -07:00
Chris Bracken 2698fe852e Delete a duplicate EditableText test (#12325)
In 85c425ac88, a test was added to ensure that widget.onChanged was
fired when the contents of an EditableText changed via system paste
events (e.g. triggered from a TextSelectionOverlay). Due to a long stack
of rebases and (less-than-perfect) manual merge conflict merge
resolution, it was inadvertently added twice.
2017-09-29 11:18:53 -07:00
Michael Thomsen 3f6b28dddb Add a check for gradle failing due to missing licenses (#12318)
* Add a check for gradle failing due to missing licenses

* Review feedback Jakob
2017-09-29 13:49:38 +02:00
Michael Goderbauer 35ce207b14 Fix failure message in SemanticsTester (#12308) 2017-09-28 17:52:43 -07:00
Chris Bracken 85c425ac88 Improved behaviour for text-editing widgets (#12273)
This patch fixes a collection of issues with widgets involved in text
editing:

  * Fire widget.onChanged on EditableText value change:
    The value of an EditableText is composed of the text value as well
    as other editing-related data such as selection-related information.

    Previously, widget.onChanged() was only called for updates via
    updateEditingValue(). For pastes via a TextSelectionOverlay, updates
    are signalled via _handleSelectionOverlayChanged(), which only ever
    triggered widget.onSelectionChanged(), but not widget.onChanged().

    Both updateEditingValue() and _handleSelectionOverlayChanged()
    perform the value update via _formatAndSetValue(), which is where
    this patch moves the widget.onChanged() call.

  * Correctly update TextFormField value on edits via controller:
    The textual value of a TextFormField exists in two locations:
      1. FormField.value, as with all FormFields and subclasses.
      2. TextEditingController.value associated with the TextField
         underlying the TextFormField.

    Previously, edits to the TextEditingController associated with a
    TextFormField resulted in updates to the rendered TextField widget,
    but did not update TextFormField.value. FormField.value is updated
    via FormField's onChanged function, which is called from the
    EditableText underlying the TextField underlying the TextFormField.
    EditableText only fires onChanged when it receives changes from the
    engine. It does not fire onChanged for changes made to the
    underlying TextController, since the owner of the TextController is
    the one making these changes and thus, already aware of them.
    FormField, however, *does* need to listen to these changes to update
    its value.

  * Adds an initialValue parameter to the TextFormField constructor:
    FormField's constructor already takes an initialValue parameter,
    which specifies the initial value in the field, which is also the
    value to which reset() returns the field.

    Previously, TextFormField took its initial value from the controller
    value (if a controller was passed in) or the empty string (if not).
    This had the undesirable effect that calling reset() always resets
    the value to the current value of the controller... i.e., does
    nothing.

    We now take an initial value explicitly.
2017-09-28 17:45:49 -07:00
Ian Hickson e1fa035b69 Retry on failed download. (#12293) 2017-09-28 17:37:34 -07:00
Ian Hickson 4c83ea8bef SafeArea (#12292)
* SafeArea

* AnimatedSafeArea

* AppBar test

* Apply feedback
2017-09-28 17:37:25 -07:00
Ian Hickson 9646e1fbad BorderSide improvements (#12294) 2017-09-28 16:43:46 -07:00
Ian Hickson 9909e773dc More documentation fixes (#12290) 2017-09-28 16:43:33 -07:00
Stefano Rodriguez dca164ab2d Fix LinearProgressIndicator constructor (#12282)
* Update AUTHORS

* Add background and value colors to LinearProgressIndicator

* Add tests for LinearProgressIndicator with colors
2017-09-28 15:17:07 -07:00
Todd Volkert ce59412cf2 Remove hard-coded "Runner" from iOS simulator logs filtering (#12306) 2017-09-28 13:11:16 -07:00
Chris Bracken 283f27d422 Clarify libimobiledevice installation status message (#12303)
Differentiate between 'not installed' and 'not working' and emit a more
targeted message.
2017-09-28 13:04:59 -07:00
Alexander Aprelev 1a3097025d Clone hot reload benchmark for --preview-dart-2 option. (#12251)
* Clone hot reload benchmark for --preview-dart-2 option.

* Get rid of linux and win preview_dart_2 (only android would be sufficient for now). Refactor code into lib/tasks

* Revert 2016 to 2017

* Mark new test as flaky
2017-09-28 12:45:54 -07:00
Chris Bracken f06ef528e9 Verify EditableText fires update on replaced controller (#12276)
Adds a test that verifies that EditableText sends a
TextInput.setEditingState message to the engine when the associated
TextEditingController is replaced.
2017-09-28 12:18:56 -07:00
Michael Goderbauer ad41de0059 Roll engine to bdfedcc26f78ea332cdac0ed67590157c82c954e (#12302) 2017-09-28 10:54:14 -07:00
Todd Volkert 9ea1ff12d7 Add Flags class. (#12268)
This class lives in the Context and allows callers to "inject"
flag values, where flag values are first extracted from the
command arguments, then from the global arguments as a fallback.
2017-09-28 09:36:55 -07:00
Ian Hickson efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
gspencergoog 4389f07024 This adds multiline text widget support. (#12120)
Add multiline keyboard support to editable text widget.  Fixes #8028.
2017-09-27 14:23:34 -07:00
Michael Goderbauer 2670786210 Send scroll progress with ScrollCompletedSemanticsEvent (#12263)
* Send scroll progress with ScrollCompletedSemanticsEvent

This requires engine change https://github.com/flutter/engine/pull/4144

* fix analyze warning

* review comment

* Roll engine to 45b11f742d38ebf564a5a832b1af00661d1a31fa

* fix test
2017-09-27 13:14:46 -07:00
gspencergoog 31fe65e23b Roll engine to 90ba98e741007cf249db26517ff8efea1a56057e (#12272)
Rolling the engine so I can land the flutter side of multiline text changes.

There are no other changes since the last roll.
2017-09-27 10:06:54 -07:00
Ian Hickson 63d7b9338d Update engine.version (#12265)
* Update engine.version

Rolls engine to have:
* https://github.com/flutter/engine/pull/4139 Replace a View.getDisplay call that is not supported on API level 16 
* https://github.com/flutter/engine/pull/4135 Remove spurious error message
* https://github.com/flutter/engine/pull/4141 Clamp overflows in Color.lerp
* https://github.com/flutter/engine/pull/4125 Update vulkan semaphore extension

* Update engine.version
2017-09-26 14:54:23 -07:00
Sarah Zakarias 3cbbbf0617 Allow empty pubspec file when building asset bundle (#12269) 2017-09-26 23:14:20 +02:00
Chris Bracken 65e3df8869 Fix a minor typo in the TextField.controller docs (#12267) 2017-09-26 13:37:53 -07:00
asaarnak 97dd12cf83 Seems like a lint was renamed. (#12034)
* Seems like a lint was renamed.

Lint `- unnecessary_brace_in_string_interp` is not in the list here: http://dart-lang.github.io/linter/lints/

In linter [0.1.30](9652dd44b6/CHANGELOG.md (0130)): [http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interp.html](unnecessary_brace_in_string_interp)
In linter [0.1.2](9652dd44b6/CHANGELOG.md (012)): [http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interps.html](unnecessary_brace_in_string_interps)

* Fix lint tests. analyze_once_test.dart and create_test.dart
2017-09-26 11:03:45 -07:00
jiamingc 8a441ae72b Make switch widget accept 3 other colors. (#12118)
* Make switch widget accept 3 other colors: inactiveThumbColor, inactiveTrackColor, activeTrackColor.

* Make switch widget accept 3 other colors.

* Make switch widget accept 3 other colors.
2017-09-26 10:05:51 -07:00
Kyle Bradshaw 7a35db1f99 _SaltedKey solution to ExpansionPanelList (#11902)
* _SaltedKey solution to `ExpansionPanelList`

_SaltedKey implementation courtesy of @Hixie
Tested and confirmed working.
Fixes #11166

* Added a simple test

* Style correction to test
2017-09-26 10:04:17 -07:00
Todd Volkert bb0a724a1d Don't require .packages file for flutter packages command (#12258)
(it's the command that populates the .packages file)
2017-09-26 09:12:40 -07:00
Adam Barth 3433f42b09 Attempt to fix Fuchsia build (#12259) 2017-09-26 08:50:41 -07:00
Sarah Zakarias a0e91bf9e8 Update Flutter Gallery to use new asset api for package assets (#12254) 2017-09-26 15:21:01 +02:00
Sarah Zakarias 49ba974710 Factor out flutter manifest logic (#12237) 2017-09-26 14:48:52 +02:00
Todd Volkert a08b5e00af Run command validation on all commands. (#12246)
This makes command validation happen as part of `verifyThenRunCommand()`,
using a newly introduced protected method (`validateCommand()`) rather than
a `commandValidator` property (that subclasses were responsible for manually
invoking).
2017-09-25 18:56:37 -07:00
Jason Simmons 6420c75f26 Handle cancellation of the date/time picker in the Gallery full screen dialog demo (#12248) 2017-09-25 13:59:05 -07:00
Michael Goderbauer 48e644057a Roll engine to 005212683c9cdc1c580b83aec70f25b4aba9872b (#12244)
This picks up a skia roll, which fixes some black screens on Android emulator.
2017-09-25 12:16:29 -07:00
Sarah Zakarias 82ec7a2af5 update pubspec.yaml.tmpl of package and plugin (#12238) 2017-09-25 13:09:28 +02:00
Ian Hickson e04bf3285d Image RTL (#12230) 2017-09-24 16:14:55 -07:00
Todd Volkert ff45d50655 Remove explicit width in ListTile trailing element (#12221)
It was incorrectly added in #11858
2017-09-24 13:21:28 -07:00
Ian Hickson 47c387b6c7 positionDependentBox (#12232)
Fix the documentation (it was just wrong before).

Add an explicit code path to handle horizontal overflow so that we
don't have a left bias.
2017-09-24 01:40:54 -07:00
Ian Hickson 953dabc70b Fix some typos (#12233) 2017-09-24 01:40:42 -07:00
Adam Barth 260353f292 RTL support for DataTable (#12229)
Just some very minor tweaks to remove subtle LTR bias.

We use the same arrow rotation animation in RTL and LTR, but I think
that's correct. Usually, rotations are either clockwise or
anitclockwise, which are the same in RTL and LTR. We might need to check
with someone who reads an RTL language to confirm.

Fixes #11845
2017-09-24 00:33:21 -07:00
Ian Hickson 78a29260ff Some more tests for AnimatedPositionedDirectional and more debugging checks (#12231) 2017-09-24 00:29:21 -07:00
Adam Barth 824db696b8 Add AnimatedPositionedDirectional (#12228)
This widget makes it easier to animated Positioned widgets with
awareness of the ambient Directionality.

Fixes #11998
2017-09-23 23:20:46 -07:00
Ian Hickson 36e7138e4f Update some places that mentioned the old update-packages --upgrade (#12218) 2017-09-23 22:23:09 -07:00
Adam Barth ebffe15994 Clean up TableBorder#paint API (#12226)
Previously, the rows and columns arguments had different semantics. Now
they have the same semantics. The new API also uses Iterable rather than
List to give clients more flexiblity in how they construct these
arguments. For example, RenderTable no longer needs to reify the
reversed list of column positions.
2017-09-23 13:39:49 -07:00
Adam Barth 1a0bdb9619 Add RTL support to Table (#12225)
Also, fix asserts in TableBorder#paint to match documentation.

Fixes #12009
2017-09-23 12:31:55 -07:00
Ian Hickson fe27f86403 Clean up the file names in the painting/ library (#12217)
After all my recent refactorings, some of the names were not really reasonable any more.
2017-09-23 00:00:46 -07:00