3122 Commits

Author SHA1 Message Date
gspencergoog
8d41fa7862 Adding proper accommodation for textScaleFactor in bottom navigation bar. (#12421)
This updates the bottom navigation bar to be able to handle more general widgets in the place of the label in the bottom navigation bar, so that Text with a textScaleFactor larger than 1.0 will behave nicely in a bottom navigation bar.

It also means that other widgets given instead of a Text widget for the label will work more predictably.

I also vastly simplified the layout logic, eliminating many computations that were not needed, and refactored the build function to use a separate private navigation tile widget.

Also, the color splash animations were coming from the wrong location (they were coming from far to the right of the touched widget), so that works as specified now.
2017-10-06 08:13:34 -07:00
Iiro Krankka
0a85db2958 Change PageController#nextPage & #previousPage methods to return Future when the animation completes. (#12299)
* Changed PageController #nextPage & #previousPage to return a Future after completing.

* Removed false statement about returning a Future in PageController#jumpToPage

* Added tests to make sure nextPage & previousPage return Futures.

* Tested that the Futures returned by nextPage & previousPage actually resolve.

* Renaming *pageCalled to *pageCompleted, since that's what it's actually for.
2017-10-05 21:13:27 -07:00
Yegor
150c58303e Date picker i18n (#12324)
* formatYear

* localize date picker

* tests

* clean-ups

* address comments
2017-10-05 17:15:20 -07:00
Yegor
6ca2e5dc10 fix _debugCheckOwnerBuildTargetExists; sync localizations and tests (#12245)
* Revert "When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed. (#12304)"

This reverts commit 90028813a89a3de8154144e6e0f1edbe90dc2e4f.

* fix _debugCheckOwnerBuildTargetExists; sync localizations and tests

* address comments
2017-10-05 15:14:56 -07:00
Adam Barth
a30b109c9e Add RTL support to ListBody (#12414)
Fixes #11930
2017-10-05 09:45:41 -07:00
Ian Hickson
cd3715a854 Border RTL (#12407) 2017-10-05 01:12:21 -07:00
Yegor
cc3f5767f4 ThemeData: optimize by removing polymorphism and caching; fix merging (#12249)
* optimize ThemeData: make it monomorphic, memoize result

* address comments

* RLU cache; fix text theme merging

* use FIFO cache for ThemeData; use HashMap to store inherited widgets

* address comments
2017-10-04 21:50:32 -07:00
Michael Goderbauer
7a73ddf5c2 Make TabBarView/PageView accessible (#12386)
* Make TabBarView/PageView accessible

* review fedback
2017-10-04 10:55:44 -07:00
Ian Hickson
c314548fd7 Decoration improvements (#12356)
Documentation changes, and, in particular, the ability to lerp from
and to any decoration by lerping via null.
2017-10-03 16:10:59 -07:00
Hans Muller
528d28ba03 Add material/18n/README.md (#12359) 2017-10-03 10:10:32 -07:00
Michael Goderbauer
49499457f2 Drop invisible SemanticsNodes from tree (#12358)
* Drop invisible SemanticsNodes from tree

A node is invisible if it is outside of the bounds of the screen and if it is not merged into its (partially) visible parent.

Also in this PR: only set `wasAffectedByClip` to true if the nodes has actually been clipped.

* Fix other failing tests

* renaming

* review feedback

* more doc
2017-10-03 09:52:36 -07:00
Adam Barth
6128f48c80 Switch SlideTransition over to using Offset (#12369)
Previously, we used `Alignment`, which was difficult to understand. Now,
we just use an `Offset` scaled to the child's size, which is much easier
to understand.
2017-10-02 23:30:14 -07:00
Adam Barth
31b6ac049c Restore FractionalOffset operators (#12368)
These now act the way they used to act if both operands are
FractionalOffsets.  Once you mix in some other AlignmentGeometry
objects, everything gets converted to the AlignmentGeometry coordinate
system.
2017-10-02 21:48:24 -07:00
Ian Hickson
7bfa3c5676 FlutterLogoDecoration.lerpFrom/lerpTo with non-logos (#12360)
FlutterLogoDecoration should defer to Decoration for what to do when
it doesn't know how to lerp to/from another kind of decoration.
2017-10-02 17:32:00 -07:00
Ian Hickson
ce930db3b4 Move Border into its own file (#12364)
I'm about to add the BoxBorder and BorderDirectional classes to
this new file, but figured it would make review easier if the move
of the existing class happened first.
2017-10-02 17:06:57 -07:00
Alex
eb2518f20a fix(typo) desc of jumpToPage (#12320) 2017-10-02 16:59:26 -07:00
Michael Goderbauer
affdab1a5a Add SemanticsEvent.toString for easier debugging (#12363) 2017-10-02 15:46:22 -07:00
gspencergoog
18f0d3aef7 Add framework support for system text scale factor. (#12180)
* Add framework-side support for system text scale factor.

* Rolling engine to e3404b81a53ba3180c7623a6f2190ebb28518f30
  Additional changes rolled in with engine change:
    libtxt: implementation of GetRectsForRange that processes a line at a time - e3404b8
    Provide an entropy source to the Dart engine (#4161) - e1aa867
    libtxt: search for fallback fonts that can match emoji and CJK characters - 8061df1
    Roll skia to e4679fa06a. (#4157) - 267e7a8
    Update buildroot to 53fea9aebbcc39c6522731471a1a45960ee0685e (#4160) - 02ea7ae
    Revert engine Dart roll. (#4158) - 14aab33
    Add support for system text scale factor. (#4124) - b2a7f4b
    Include _http into sky_engine libraries for analyzer (#4154) - b930f10
    libtxt: Remove postprocess_line and improve tracking of X offsets - 86f95f0
    libtxt: remove redundant line_widths (#4152) - 14bf515
    Roll dart to ade37f931e90b0fdb8fe16d6bf6f089545da55b6 (#4151) - 6f1264f
2017-10-02 14:18:18 -07:00
Ian Hickson
7d75c29b3b BoxDecoration tweaks (#12336)
Reorder the code, remove some redundant documentation, improve the
interpolation logic.
2017-10-02 11:20:34 -07:00
Ian Hickson
53194ed477 ShapeBorder (#12335)
This class lays the groundwork for RTL borders.
2017-10-02 10:24:01 -07:00
Michael Goderbauer
437e4c089b Make "mergeIntoParent" information available during compile of semantics tree (#12332)
* ++

* Allow unmerging of SemanticsNodes

* test passing

* ++

* remove prints

* doc comments

* rectify comment

* review comments
2017-10-02 09:49:04 -07:00
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
21899ce62f Honor more of the Theme for CircleAvatar with backgroundColor (#12333) 2017-09-29 15:38:22 -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
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
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
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
Chris Bracken
65e3df8869 Fix a minor typo in the TextField.controller docs (#12267) 2017-09-26 13:37:53 -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
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
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
Hans Muller
c44aa2665d Aborted Hero push transitions should retrace their flight path (#12203) 2017-09-22 15:33:50 -07:00
Yegor
f2d096010d Internationalize time numerals in the time picker and TimeOfDay (#12166)
* internationalize time numerals

* tests

* use foundation.dart instead of meta.dart

* address comments
2017-09-22 14:35:25 -07:00
Yegor
b9e1be9ace introduce localized text geometry in MaterialLocalizations (#11829)
* introduce localized text geometry in MaterialLocalizations

* remove geometry from color text themes

* fix merge conflict

* optional Localizations

* fix fallback; test; docs
2017-09-22 13:15:01 -07:00
Yegor
f4f20c2909 misc .arb fixes; localizations validator (#12197)
* misc .arb fixes; localizations validator

* regenerate localizations

* address comments

* do not treat plural variations as invalid keys
2017-09-22 12:26:47 -07:00