Removes bottom padding from the child AppBar in SliverAppBar. Scaffold
already does this for its own app bars, but sliver app bars in the body
should also apply the bottom padding removal.
Fixesflutter/flutter#13458
Also:
* Remove find.byIcon since it's identical to find.icon. (I sent mail to flutter-dev about this.)
* Fix IconData's operator== and hashCode, which had not been updated when we added fields.
* Add the byTooltip finder to the list of suggested finders.
* Make the suggested Key finder prettier.
* make time picker accessible
* use new CustomPaint a11y API
* flutter_localizations tests; use bigger distance delta
* fix am/pm control; selected values
* fix translations; remove @mustCallSuper in describeSemanticsConfiguration
* exclude AM/PM announcement from iOS as on iOS the label is read back automatically
Updates scaffold to expose bottom padding to the associated
BottonNavigationBar (if present). BottomNavigationBar is now responsible
for adjusting itself to account for bottom padding.
This change is necessary to support the updated BottomNavigationBar
layout for the iPhone X.
* Remove MediaQuery padding for various PopupRoutes that don't extend to the edge of the screen
* bottom sheet doesn't actually need handling. Scaffold does it already. Add test for others.
Now that keyboard height is modelled as a (bottom) view inset, migrate
scaffold bottom resizing to use view insets instead of bottom padding,
which, after an engine roll, will only be used for safe areas.
Until the aforementioned engine roll, the keyboard height is still
included in both bottom padding and view insets. As such
resizeToAvoidBottomPadding still drives bottom padding removal until
that roll lands.
Renames _ScaffoldLayout.bottomPadding to bottomViewInset
This patch contains no framework changes.
This change adjusts a test bottom navigation bar height to be greater
than the media bottom padding.
This change is pre-factoring to clarify diffs in an upcoming change that
will expose bottom padding to the bottom navigation bar in order to
allow it to visually adapt its appearance in the presence of bottom
padding such as thatexposed for the iPhone X home screen indicator.
Since the bottom padding was previously greater than the height of the
bottom navigation bar, the height of insideBottomNavigation bar was
driven to 0 when padding is exposed.
Scaffold bottom padding now applies the maximum of window
viewInsets.bottom (typically used for iOS safe areas) and padding.bottom
(typically used for keyboard height).
* add an assert to validate the RefreshIndicator.onRefresh result
* add a test for RefreshIndicator.onRefresh assert
* switch to using FlutterError.reportError, FlutterErrorDetails, and FlutterError
This fixes the popup menu code to do a better job of expanding
smoothly regardless of which side of the screen it's on. It still
results in a bidirection growth when positioned at the bottom of the
screen, so maybe we'll need to animate menus differently, but that's
a problem for another patch.
Also, improve some docs and provide RelativeRect.toSize which I needed
at one point while building this patch (though it didn't survive all
the way to the end).
This fixes DropdownButtons to align their popups correctly in RTL as well.
Also while I was there I fixed the issue with text scale factor in the gallery.
Previously, ExpansionPanel would do weird things if interacted with
when it was already animating. This is fixed and there's now a test.
Also:
* Minor fixes to make the gallery work in RTL, not that there's
any way to see that without hard-coding the framework to RTL.
But at least I'll be less annoyed when doing that.
* Some trivial code and documentation cleanup.
This makes ListTile expand vertically when text is scaled, or really when whatever is placed inside it is larger than the available space.
In order for UnconstrainedBox to be useful here, I needed for it to only unconstrain the child Row in one dimension, so I added a "constrainedAxis" parameter to the UnconstrainedBox.
Also, changed one enum test to use a switch instead.
I modified the ListTile test to be more representative of the intention of the spec: we were testing with text in the leading and trailing sections, and the design wants icons there. Because there was leading text, and the dense mode only changes the font size on the text lines, the leading text was propping up the minimum size of the tile, making so that the test wasn't really testing any changes in dense mode.
UnconstrainedBox will allow its child to size itself as if it had no constraints, and then attempt to fit around that object, until its own constraints are exceeded, in which case it will clip and display an overflow warning.
I also factored out DebugOverflowIndicator, which will draw overflow indicators on containers which overflow but aren't expected to.
* Surface shadowColor from RenderPhysicalModel to Material
* Fix typo in material_test
* Add nullability info to documentation
* Add support for animating elevation shadow color
* Add shadowColor to Material's debugFillProperties()
* Add missing default value for elevation in Material debugFillProperties()
* Add missing non-null asserts for animate flags in AnimatedPhysicalModel
* Add test for shadow color animating smoothly
This fixes the assumption that InputDecorator had where it expected baseStyle to be a complete style. Now it merges the baseStyle with the subhead style instead of substituting it entirely.
This fixes#12832.
In order to allow chips to be properly drawn when they expand in size (without
using IntrinsicHeight), I needed a BoxDecoration shape that would be dependent
upon the rendered height of the widget. This seemed to be pretty generally
useful, so I added a new ShapeDecoration called StadiumBorder. It uses the
minimum dimension to adjust the BorderRadius of a rounded rect in the shape
decoration.
I also converted some uses of BoxShape to be case statements, updated the
chips to use the StadiumBorder decoration, and updated some of the metrics to match
the Material spec, as well as implementing lerping to and from StadiumBorder.
* alwaysUse24HourFormat in MediaQuery and time picker
* docs; dead code
* address some comments
* MaterialLocalizations.timeOfDayFormat is the single source of 24-hour-formattedness
* Make TimePickerDialog private again
* wire up MediaQueryData.fromWindow to Window
This adds an optional character counter and maxLength parameter to the TextField, as described in the Material Design Spec.
The counter text and style in the input decorator may be specified, but will default to the "right thing" if not specified, where the "right thing" is a counter that looks like "3 / 10" (if there are three characters entered into a field where maxLength is set to 10).
To limit the number of characters entered, I created a LengthLimitingTextFormatter that will limit the number of characters (Unicode runes) in the input, which can be used independently. The formatter is applied after the other formatters supplied (if any). Even if there is no decorator, the text field will limit the number of characters input if maxLength is set.
If maxLengthEnforced is set to false (it defaults to true), then the max length will not be enforced. In that case, if the text exceeds the length, then the counter will turn red, and it will make the divider turn red.
This reverts commit 67cf7918cfc9201cfc05f508278a3ab6571bbb8e.
Reverting because this causes scuba regressions that I'd like to
address in another PR that is pending, but we'd like to roll Flutter.
* Theme provides all TextStyle properties
* match field declaration order in the test
* Theme.of returns text style with inherit == false
* change TextStyle.inherit logic; docs
* add TextStyle.debugLabel
* address comments
* add debug labels to Typography text styles
Fixes InputDecorator to work with textScaleFactor, fixes Material Design differences.
There were a number of differences with the Material Design spec, including
several different padding values and underline thickness. This corrects
that so that the decorator is in line with the Material Design spec now.
Also, the decorator properly handles changes to the textScaleFactor, where
before it would not re-layout when needed, painting the cursor and
underline incorrectly.
The decorator also now properly animates helper, error, and hint text when
the textScaleFactor or input decoration properties change.
Helper text is now properly displayed in dense mode, as the spec shows.
Before this change, it was never displayed in dense mode.
Fixes#12485