[Proposal] add clickable region in InputDecorator #104345
Labels
c: new feature
Nothing broken; request for a new capability
c: proposal
A detailed proposal for a change to Flutter
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
use case
Achieving this kind of input with a inkWell on the left is pretty damn hard:
This is convoluted to do. You have to measure the height of the input decorator, remove the error height when there is an error, change the height when it's underline or outline border, when there is a label or not and so on. Then you have to wrap the input decorator in a stack, have the clickable region be the correct height and width, but it also has to be aligned correctly, the width also depends on a series of factor from InputDecorator. Then comes the aligments issues with the main textField...
I've tried everything, multiple times nothing is straightforward here.
Simply put to achieve something like that you have to hack your way around InputDecorator, because it's not build to do this kind of things. It makes packages harder to maintain that they need to be.
proposed
This is just an idea, I'm sure there are better ways but:
prefixRegion
&suffixRegion
to input decorator which would add a inkWell around the prefix / suffix.The text was updated successfully, but these errors were encountered: