496 Commits

Author SHA1 Message Date
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
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
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
bd1921ec84
unnecessary parenthesis (#14533) 2018-02-16 07:43:19 +01:00
Vyacheslav Egorov
08db0d83d7
Adjust test/material/popup_menu_test.dart for Dart 2 semantics. (#14644) 2018-02-15 10:31:46 +01: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
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
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
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
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
Hans Muller
f5dea9325b
Material button update (#14410) 2018-02-05 12:59:45 -08:00
Hans Muller
f0f0f09707
Fix InkRipple.cancel animation race (#14442) 2018-02-02 16:13:56 -08:00
Alexandre Ardhuin
c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Ian Hickson
c12d120bbf
Provide a way to override global InheritedWidgets (#14348)
For example, so that the gallery can override the media query globally.
2018-02-01 23:12:52 -08:00
Alexandre Ardhuin
12ceaefb18
work around const lints (#14416)
* work around const lints

* update nonconst doc
2018-02-02 08:06:42 +01:00
Michael R Fairhurst
51158c9177 Fix passing "void" into "dynamic" to future-proof new changes. (#14366)
Using a void list literal in this case is valid and correct, and will be
required for dart 2.

Note: void can be inferred here, but followed the lints to write it
explicitly even though that's arguably a bit weird in this case and less
backwards compatible.
2018-02-01 05:09:07 -08:00
Alexandre Ardhuin
841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Chris Bracken
b0e17949aa
Position bottom bar widgets relative to window (#14406)
Note: also fixes a bug wherein bottom media padding was applied even in the
presence of persistent footer buttons.

The material spec states that the keyboard should be positioned on top
of any bottom navigation bar or persistent footer buttons widget(s).

We no longer inset the bottom of bottom navigation bars / persistent
footer buttons by the bottom viewInset.

Body content bottom (and the bottom of bottom sheets) is now determined
by the greater of:
  1. bottom view inset (the keyboard height)
  2. bottom elements (nav bar, footer buttons)
relative to the window max-Y.
2018-01-31 21:19:15 -08:00
amirh
d9ef7df978
Use RRects instead of Paths when possible in Material. (#14404)
0672055a72ff1265b2aedb037f2848455318f22a changed the Material widget to
always use Paths for representing the outline.
These paths are later used for clipping and drawing a shadow.
This changed introduced a performance regression, see:
https://github.com/flutter/flutter/issues/14403

We did not expect a path that is a rounded rectangle to be less
performant than a rounded rectangle, as Skia should be able to tell the
path is just a rounded rectangle.
Until we find a solution for this regression, we keep using RRect when
we can represent the shape with it.
2018-01-31 16:06:14 -08:00
Michael Goderbauer
b54b576c1a
Assorted a11y fixes (#14395) 2018-01-31 15:23:20 -08:00
Chris Bracken
882be89e4c
Improved bottom media padding for SnackBars (#14396)
In a scaffold, snackbars are positioned above the BottomNavigationBar
and/or PersistentBottomButtons, if present. In such cases, they should
not apply bottom media padding to their widget sub-tree.
2018-01-31 12:35:13 -08:00
Michael Goderbauer
3fd737c8f7
a11y on Android: copy/cut/paste (#14343)
With a little refactor and unification of how availability of copy/cut/paste is determined across platforms.

Minor remaining issue: https://github.com/flutter/flutter/issues/14331.

Fixes https://github.com/flutter/flutter/issues/13501.
2018-01-31 12:26:24 -08:00
amirh
0672055a72
Support arbitrary shaped Material. (#14367)
For backward compatibility we keep supporting specifying the shape as a
combination of MaterialType and borderRadius, and we just use that as a
default when shapeBorder is null.

To cleanup the implementation if shapeBorder was not specified we just
translate the specified shape to a shapeBorder internally.
I benchmarked paint, layout and hit testing, with the specialized shape
clippers vs. the equivalent path clippers and did not see any
significant performance difference.

For testing, I extended the clippers/physicalShape matchers to match either the
specialized shape or the equivalent shape.
2018-01-30 23:24:42 -08:00
amirh
178ad8aba8
Add unit tests for the Material widget (for clipping and elevation) (#14334) 2018-01-30 12:54:52 -08:00
Tom Larsen
52d47751a0 Add onCancelled callback to PopupMenu (#14226)
* Add onCancelled callback to PopupMenu

* Fix spelling, don't call onCanceled if disposed, improve documentation.
2018-01-29 20:10:43 -08:00
amirh
2e449f06f0
import all generated files in animated_icons_private_test (#14329) 2018-01-29 14:26:51 -08:00
Michael Goderbauer
671c1101a4
Change text selection (or cursor position) via a11y (#14275)
Roll engine to 7c34dfafc9acece1a9438f206bfbb0a9bedba3bf
2018-01-26 10:44:41 -08:00
Michael Goderbauer
34ff00a752
Add a11y support for selected text (#14254)
Framework side for https://github.com/flutter/engine/pull/4584 & https://github.com/flutter/engine/pull/4587.

Also rolls engine to 4c82c566edf394a5cfc237a266aea5bd37a6c172.
2018-01-25 10:12:02 -08:00
Michael Goderbauer
8059aea365
TextFields should only have one SemanticsNode (#14219)
* scrolling node eleminated

* remove second node

* fix ids
2018-01-22 18:12:39 -08:00
Hans Muller
773902c59d
Fix _RenderDecoration.debugDescribeChildren() (#14217) 2018-01-22 17:14:44 -08:00
Ian Hickson
a29d723c59
[H] Move the splitting of licenses to an isolate (#14160)
* Move the splitting of licenses to an isolate

This improves (from horrific to terrible) the performance of the
license screen. It also introduces a feature in the foundation layer
to make using isolates for one-off computations easier.

The real problem that remains with this, though, is that transfering
data between isolates is a stop-the-world operation and can take an
absurd amount of time (far more than a few milliseconds), so we still
skip frames.

More work thus remains to be done.

* - Add profile instrumentation to the isolate compute() method
- Add profile instrumentation to the LicensePage
- Add profile instrumentation to the scheduleTask method
- Make scheduleTask support returning a value
- Make the license page builder logic use scheduled tasks so that it doesn't blow the frame budget
2018-01-20 01:42:55 -08:00
Hans Muller
677f218ef6
Added InputDecorationTheme (#14177) 2018-01-19 22:53:29 -08:00
Ian Hickson
bed71b9a15
Make FadeTransition more efficient (#14155)
* Make FadeTransition more efficient

* Update fade_transition_test.dart

* Update proxy_box.dart
2018-01-18 20:22:22 -08:00
Hans Muller
629d325284
Fix: InputDecorator fails with null border, non-null labelText (#14166) 2018-01-18 17:15:43 -08:00
Michael Goderbauer
15af86459d
Identify CheckBox and RadioButton as such (#14087)
* Identify CHeckBox and RadioButton as such

* review feedback
2018-01-17 10:23:36 -08:00