Repository navigation
Description
Use case
The current documentation of flutter's TextField contains no mention of the fact that any explicit decoration is merged with whatever additional decorations are defined in the surrounding theme, making it unnecessarily difficult to debug why e.g. trying to remove a field's border (if defined in the theme) is impossible without wrapping the widget with an additional Theme containing explicit InputBorder.none values.
Proposal
As a bare minimum, some form of notice should be added to the decoration property informing about the potential need for inserting an applied-property-clearing Theme wrapper surrounding the widget.
Ideally though, users should have a less verbose way of specifying whether to merge or fully replace the active InputDecorationTheme either when creating, or when applying an InputDecoration, e.g. with a bool? mergeWithTheme on all constructors, while applying more intuitive defaults (looking at the InputDecoration.collapsed() named constructor, that would be a false rather than a true)
EDIT: Note, I got started creating a small example on https://dartpad.dev to illustrate the issue, but writing code containing a textfield over there is an absolute nightmare once "Run" is executed due to the textfield acting as a cursor magnet making further code edits an incredibly frustrating experience :(
Activity
justinmc commentedon Jan 2, 2025
CC @victorsanni from triage.
victorsanni commentedon Jan 6, 2025
Hi @Lootwig would you be interested in opening a PR to add the documentation for
TextField.decoration?[material_ui] Document that TextField.decoration is merged with Input…