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.
* Revert "Construct the accessibility channel's events by SemanticsEvent. (#12638)"
This reverts commit 4c1150dd01c0efb55278d35a9ce1467a65c45e40.
* Revert "Revert "Add a way to get the furthest Navigator" (#12608)"
This reverts commit 79f13c36258380408eb1a1738178b964be3bf7f3.
* 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
This refactoring allows us to have SemanticsEvent object for events that are not
associated with an accessibility node id.
And allow https://github.com/flutter/flutter/pull/12594 to be a bit
cleaner with a single place for accessibility channel documentation (the
SemanticsEvent classes documentation).
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
* Make Tab take a widget as child
This way you can override the semantics information of a Tab (see test).
Fixes https://github.com/flutter/flutter/issues/12432
* more tests
* review comments
* review comment
* doc nits
* style fix
This modifies the MaterialButton to expand vertically to fit the size of the contained child, no matter what the child widget is. It tries to be as close as possible to the minHeight constraint.
Also updated some doc comments to have headers (extra blank line after first sentence), and to wrap at 80 cols.
Addresses #12311
* Keep Icon's subtree structure the same with and without a semanticLabel.
This avoids rebuilding the subtree when a semanticLabel is set/unset.
Also updated some doc comments.
(This is a followup on post-merge comments for #12475)
* Roll engine
* Move assert requiring 'this' from initializer to constructor body
* Update test expected message
* Relax regexp to allow wider array of dart uris