Unverified Commit d3d4976f authored by Hans Muller's avatar Hans Muller Committed by GitHub

InputDecorator input and hint widgets have the same width (#16894)

parent 286cd359
......@@ -771,11 +771,11 @@ class _RenderDecoration extends RenderBox {
+ contentPadding.right);
boxConstraints = boxConstraints.copyWith(maxWidth: inputWidth);
layoutLineBox(hint);
if (label != null) // The label is not baseline aligned.
label.layout(boxConstraints, parentUsesSize: true);
boxConstraints = boxConstraints.copyWith(minWidth: inputWidth);
layoutLineBox(hint);
layoutLineBox(input);
double inputBaseline = contentPadding.top + aboveBaseline;
......
......@@ -259,6 +259,8 @@ void main() {
expect(tester.getBottomLeft(find.text('hint')).dy, 28.0);
expect(getBorderBottom(tester), 40.0);
expect(getBorderWeight(tester), 1.0);
expect(tester.getSize(find.text('hint')).width, tester.getSize(find.text('text')).width);
});
testWidgets('InputDecorator input/label/hint layout', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment