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.
I'm not really sure how to test this without a reference test, since
eventually we want to move this to a font feature and thus the obvious
test (looking for the Transform widget) isn't really valid.
* 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
Since MethodCall equality checks are limited to test scenarios, this
patch replaces them with an equivalent test matcher. At present
MethodCalls are always used in scenarios where indentity-based
equality/hashing is appropriate.
This change avoids an assertion failure when MethodCall args are
Iterable (possible since args are of type dyanmic), and hashValue() from
dart:ui asserts that its input is not an Iterable.
The alternative of implementing support for deep equality in dart:ui was
rejected on the basis that if we're to encourage performant code,
expensive checks should be obviously-expensive to the author.
* Built first tab
* Small additions
* started tab 3
* Need color arithmetics
* tab 2 built
* finalize
* lint and tests
* review
* Reapply docs after rebase
* use color.computeLuminance
* linter
* nit
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.
Various improvements (in particular a new painting fuzzer) to the text manual test.
Some additional documentation.
A fix to Stack to remove an LTR bias: make unpositioned children apply "alignment".
Some more debugging information on RichText and Text.
A fix to the flutter tool to not crash when an RPC call throws an exception.
* 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
* Revert "roll engine (#12660)"
This reverts commit 048bc5e0f6fe96d07bc7777792e31f96f855d5da.
* Revert "FittedBox RTL (#12662)"
This reverts commit 05a22fe0ab2e74635db6628a7fc125e1a1f20203.
* Revert "Revert "nav bar font styles are special, do not inherit (#12578)" (#12661)"
This reverts commit 662b66848562df022dcf95134b61e9958a5a74f4.
* Add a pageSnapping parameter to PageView
Setting the pageSnapping property allows extending the PageView scroll
behavior, such as custom scroll animations or custom scroll bars.
* Apply pageSnapping CR feedback
- Remove _kNonSnappingPhysics, use null instead.
- Minor code style fixes.
- It turns out that the forth state is Arkansas, not California.
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.