1442 Commits

Author SHA1 Message Date
Ian Hickson
b9a7f1b915
Add a hasListeners to ChangeNotifier (#14946)
I found that some ValueListeners want to know when they should start
doing work (e.g. if the value comes from polling a network resource).
2018-02-28 16:37:36 -08:00
xster
265d0d3c29
Add more haptic feedback varieties (#14829)
* Add more haptic feedback varieties

* tests

* un-meta-ify the test
2018-02-28 16:20:27 -08:00
najeira
e0956cbdb7 remove "the" duplications (#14952) 2018-02-28 12:21:13 -08:00
amirh
6993b203c0
Allow changing a clipper's type (ShapeBorderClipper,_BottomAppBarClipper). (#14937)
The downcast was crashing when toggling hasNotch for BottomAppBar.
2018-02-27 17:39:49 -08:00
Jason Simmons
aa04a056f3
Disable a text field test that fails on some Macs with libtxt (#14895) 2018-02-26 14:45:00 -08:00
Jason Simmons
44592238bb
Roll engine to 33b88173f3820690169348859bbdc29133179e0b (#14832)
libtxt is now the default text renderer
2018-02-26 11:39:48 -08:00
amirh
ed84fb9652
add a bottomAppBarColor to ThemeData (#14859) 2018-02-26 10:41:56 -08:00
amirh
1f3eb5034f
Add a hasNotch flag to BottomAppBar (#14856) 2018-02-23 18:35:40 -08:00
amirh
5d39f15c69
Smooth Floating Action Button notch (#14851) 2018-02-23 14:58:50 -08:00
David Shuckerow
3ee85e0137
Create and test max and min animations (#14814) 2018-02-22 14:54:27 -08:00
Hans Muller
3ea4d06340
Update TabBar indicator painter when tab controller changes (#14825) 2018-02-22 11:12:39 -08:00
amirh
01b53bd014
Fix overlap check in bottom app bar's custom clipper (#14813) 2018-02-22 09:20:37 -08:00
xster
1bdbfe7b52
Fix SliverPadding dropping the chain on scrollOffsetCorrection propagation (#14789)
* Fix SliverPadding dropping the chain on scrollOffsetCorrection propagation

* review doc
2018-02-21 14:51:14 -08:00
xster
62addedc11
Fix focus switching when changing tabs in CupertinoTabScaffold (#14431)
* Fix focus switching when changing tabs in CupertinoTabScaffold

* review

* Test focuses are saved within tabs

* review
2018-02-21 12:51:19 -08:00
amirh
7996d7fb82
Initial implementation of BottomAppBar (#14713)
* add a FAB NotchMaker to ScaffoldGeometry

* add a notchMaker to FloatingActionButton

* Initial implementation of BottomAppBar

Mainly includes the notch making logic.
Not yet tested as currently there is no way to make the FAB and the BAB
overlap, once #14368 to lands we could add unit tests to the
BottomAppBar as well.

* use a closeable for clearing the FAB notchmaker
2018-02-21 10:20:58 -08:00
Hans Muller
24efb55b03
Generalized TabBar selected tab indicator (#14741) 2018-02-21 09:13:45 -08:00
Alexandre Ardhuin
297fd9431f
fix potential call on null (#14731)
* fix potential call on null

* review
2018-02-16 22:37:07 +01:00
Alexandre Ardhuin
bd1921ec84
unnecessary parenthesis (#14533) 2018-02-16 07:43:19 +01:00
Ian Hickson
10393a12fa
Add some more documentation. (#14717) 2018-02-15 14:06:25 -08:00
Vyacheslav Egorov
08db0d83d7
Adjust test/material/popup_menu_test.dart for Dart 2 semantics. (#14644) 2018-02-15 10:31:46 +01:00
Ian Hickson
b2af326046
Fix boundaries in applyClampedDragUpdate (#14444) 2018-02-14 17:05:24 -08:00
Michael Goderbauer
e9163a1afe
Wire up didGainA11yFocus, didLoseA11yFocus for CustomPainter (#14711) 2018-02-14 15:18:59 -08:00
amirh
9bc3bc9822
expose scaled fab area in ScaffoldGeometry (#14683) 2018-02-14 14:08:13 -08:00
Alexander Aprelev
a448994543
Use the Dart SDK built from Flutter engine rather than from dartlang.org (#14610)
* Use engine-built dart sdk

* Download dart-sdk from engine

* Move up deps to fix dart sdk constraint problem

* Update update_dart_sdk.ps1 for Windows

* Fix tests so they pass analysis

* More types for tests

* Roll engine

* Update dart sdk stamp location in flutter.bat

* Add newline
2018-02-14 07:18:25 -08:00
Todd Volkert
8a65872ef9
Re-apply "Send nextId in addition to previousId for traversal order" (#14694)
Re-apply "Send nextId in addition to previousId for traversal order (#14676)"
2018-02-13 23:32:28 -08:00
Todd Volkert
e9d7bf8ce1
Revert "Send nextId in addition to previousId for traversal order" (#14691) 2018-02-13 21:50:44 -08:00
Michael Goderbauer
58689c796c
Send nextId in addition to previousId for traversal order (#14676) 2018-02-13 17:14:04 -08:00
amirh
f802cf6d16
ScaffoldGeometry plumbing. (#14580)
Adds a ScaffoldGeometry class and ValueNotifier for it.
A scaffold's ScaffoldGeometry notifier is held in the _ScaffoldState, and is passed to _ScaffoldScope.
New ScaffoldGemometry objects are built and published to the notifier.
2018-02-13 14:40:03 -08:00
Hans Muller
2aa9bb2be7
Tri-state Checkbox (#14611) 2018-02-13 14:16:31 -08:00
Greg Spencer
7be0bd1ce9
Move geometric sort for semantics to the framework side. (#14539)
This adds geometric sort ordering back in for semantics nodes that don't have a sort order defined.

With this change, widgets that either have no sort order, or have an equivalent sort order, will be compared geometrically. The comparison is between the two starting corners, so it is TextDirection-aware: parent nodes that are set to have LTR text will compare upper left corners of their children, and upper right when set to RTL.

Also fixed a bug in the Transform widget that didn't mark modified nodes as needing a semantics update.
2018-02-12 20:53:32 -08:00
Greg Spencer
bfc6833459
Swap nextNodeId for previousNodeId, since setTraversalBefore is broken. (#14607)
It seems that setTraversalBefore doesn't work as well as setTraversalAfter for some reason, although I'm using them the same way. Some apps would lock up TalkBack when traversing if setTraversalBefore was set, but not with the equivalent setTraversalAfter.

It's not entirely clear why this is, but I'm going with this to at least get it fixed for apps we know about.

Fixes #14600
2018-02-12 14:10:39 -08:00
Vyacheslav Egorov
dfbbd30de5
Update expectations in stack_trace_test: there is no async-patch in Dart 2 mode. (#14643)
Dart 2 applies core library patches during the build, so there is only a single
 dart:async library.
2018-02-12 19:36:31 +01:00
Vyacheslav Egorov
ce82cc656c
Fix Dart 2 issues in editable_text_test. (#14632)
Need to use `typed(any)` instead of `any` in Dart 2.
2018-02-12 08:20:32 +01:00
Michael Goderbauer
04d3ecb87e
Add accessibilityFocus and loseAccessibilityFocus as a11y actions (#14603) 2018-02-09 19:57:02 -08:00
Michael Goderbauer
72517f0a0a
Encode scrolling status into tree (#14536) 2018-02-09 18:33:50 -08:00
Alexander Markov
d64efe9fdb
Roll engine to a031239a5d4e44e60d0ebc62b8c544a9f592fc22 (#14601)
Includes:
* Exclude frontend_server from the license crawl (https://github.com/flutter/engine/pull/4645)
* Make native wrapper classes non-abstract (https://github.com/flutter/engine/pull/4607)
* Restrict clang-format to C, C++, Obj-C, Obj-C++ (https://github.com/flutter/engine/pull/4654)
2018-02-09 14:40:28 -08:00
Alexander Aprelev
0f3aa50071
Roll engine with rolled dart (#14538)
* Roll engine to pre-dart roll

* Roll engine to pick up updated dart

* Apply Map changes

* Move to dev.22

* Fix some analysis issues

* Silent analyzer

* More consts

* More const massaging

* Yet more const massaging

* Yet more const massaging

* Use nonconst()
2018-02-09 10:33:24 -08:00
Vyacheslav Egorov
d20125c3da
Change GlobalObjectKey.toString to strip away State<StatefulWidget>. (#14558)
This allows const GlobalObjectKey(0) to be concisely formatted as
[GlobalObjectKey int#0000] in both Dart 2 and Dart 1 modes.

Without this change it would be formatted as
[GlobalObjectKey<State<StatefulWidget>> int#0000] because in Dart 2
types are instantiated to bounds.

In addition to retaining general readability this also fixes few
tests that rely on this short string representation (see
test/widgets/global_keys_duplicated_test.dart).
2018-02-09 09:51:58 +01:00
Vyacheslav Egorov
7db0564ab6
Fix message channel usage in few tests. (#14557)
Channels don't preserve Map and List type arguments: Map<String, Object>
arrives as Map<dynamic, dynamic> to the receiver.

In Dart 2 type system dynamic no longer serves as bottom type so
Map<dynamic, dynamic> can't be assign to a variable of type
Map<String, dynamic>.

Issue #14556
2018-02-08 22:25:25 +01:00
Vyacheslav Egorov
90ddb2370b
Fix text_style_text.dart to be Dart 2 compliant. (#14559)
In Dart 2 mode we throw different exception: compiler generates
throw of a compilation error instead of runtime throwing
noSuchMethod.
2018-02-08 22:10:31 +01:00
Vyacheslav Egorov
4814303bf7
Partially fix Dart 2 issues in animated_icons.test. (#14531)
Use mockito in the Dart 2 compliant way:

* use typed(...) in appropriate places to wrap matchers like any;
* don't pass matcher directly into the calls - use `argThat(matcher)`.

Also rename paintColorMatcher to hasColor to match how other similar
functions are named and how the code reads.
2018-02-08 17:00:18 +01:00
Vyacheslav Egorov
0556e14f18
Strong mode fixes in tests (#14520)
* Use explicit types for onClick handler in diagnostics_test.

This test formats it to string and expects exact match.

Before this change onClick had type () => dynamic in Dart 1 and () => Null in
Dart 2.

* Fix strong mode issues in packages/flutter/test/material/dropdown_test.dart

Pass explicit type argument to renderObjectList(...) in expressions like

     List<RenderBox> l = tester.renderObjectList(...).toList();

Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
fto renderObjectList and passes RenderObject instead, which later leads to
runtime check failures (because List<RenderObject> is not List<RenderBox>).

* Fix strong mode issues in packages/flutter/test/material/theme_test.dart.

Pass type argument explicity to widgetList. Dart 2 type inference can't infer
it by itself.

* Fix strong mode issue packages/flutter/test/widgets/unique_widget_test.dart

Pass correct type argument to GlobalKey.

* Fix type annotation in packages/flutter/test/material/app_test.dart.

pushNamed returns Future<Object> not Future<String>.
2018-02-08 09:31:34 +01:00
amirh
4ae1b5f415
Paint the shape border in the Material widget (#14383) 2018-02-07 15:18:04 -08:00
Chris Bracken
66ecfb02c2
Apply media padding to persistent footer buttons (#14512)
Applies left, right, and bottom media padding (e.g. iOS safe area
insets) around ButtonBar in the material scaffold
persistentFooterButtons.
2018-02-07 09:34:46 -08:00
Amir Hardon
d0a72752ac update buttons_test to expect clipPath instead of clipRRect 2018-02-06 18:44:42 -08:00
Amir Hardon
c90983dde9 add a pushClipRRect override to TestRecordingPaintingContext 2018-02-06 18:44:42 -08:00
Amir Hardon
cc060ff2f2 Use PhysicalModel for the default canvas Material.
This is done to keep in place the workaround we have for rectangular material
where PhysicalModel skips the saveLayer call.
2018-02-06 18:44:42 -08:00
Amir Hardon
b79f4e319d Revert "Use RRects instead of Paths when possible in Material. (#14404)"
This reverts commit d9ef7df978e6d50663a4d100963ec16205f3ab6f.
2018-02-06 18:44:42 -08:00
Chris Bracken
4b878dc687
Add minimum insets to SafeArea (#14505)
As a convenience, this adds a set of minimum padding to apply. The
greater of the minimum padding and the media padding is applied to each
edge.
2018-02-06 15:27:39 -08:00
Chris Bracken
35c2267ffe
Add SliverSafeArea widget (#14499)
A SafeArea-like widget that applies a SliverPadding instead of a
Padding.
2018-02-06 14:28:58 -08:00