WIP: TextInputTheme support step 1 of 3. #61008
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As part of the larger theme system update, this PR provides a new
TextFieldTheme
that configures the properties ofTextField
s. The initial supported properties are thecursorColor
andselectionHandleColor
, with more to come in future PRs.As we are updating the default values for each of these properties this will eventually be a breaking change. However, for this first step this is all turned off by default. To turn on the text field theme support you can set the new temporary
ThemeData.useTextFieldTheme
flag to true.TBD: description of new defaults and breaking change migration docs
Related Issues
#17635
#56082
Tests
I added tests for the new theme as well as updating the overall
ThemeData
tests.Checklist
///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them?
This PR specifically won't break any tests, as it is a soft migration. Overall however, after all stages of this are complete it will be a breaking change.
TBD: breaking change docs.