Skip to content

Commit 821f2ca

Browse files
committed
[HOTFIX] Apply a fixed height to passive text fields.
1 parent ee86543 commit 821f2ca

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

lib/src/transformers/node_transformers/passive_text_field_transformer.dart

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ class PassiveTextFieldTransformer extends NodeWidgetTransformer<TextFieldNode> {
149149
FunctionsRepository.setPropertyVariable(context,
150150
node: node, property: 'inputValue', value: inputValue);
151151

152-
FunctionsRepository.triggerAction(
153-
context, node, TriggerType.changed, value: inputValue);
152+
FunctionsRepository.triggerAction(context, node, TriggerType.changed,
153+
value: inputValue);
154154
}
155155

156156
void onSubmitted(
157157
BuildContext context,
158158
TextFieldNode node,
159159
String inputValue,
160160
) =>
161-
FunctionsRepository.triggerAction(
162-
context, node, TriggerType.changed, value: inputValue);
161+
FunctionsRepository.triggerAction(context, node, TriggerType.changed,
162+
value: inputValue);
163163
}
164164

165165
class PassiveTextFieldWidget extends StatefulWidget {
@@ -254,9 +254,17 @@ class _PassiveTextFieldWidgetState extends State<PassiveTextFieldWidget> {
254254
),
255255
);
256256

257-
if (!widget.node.isHorizontalExpanded) {
258-
field = SizedBox(width: widget.node.basicBoxLocal.width, child: field);
259-
}
257+
final double? width = widget.node.isHorizontalExpanded
258+
? null
259+
: widget.node.basicBoxLocal.width;
260+
// TODO: Make adaptive
261+
final double height = widget.node.basicBoxLocal.height;
262+
263+
field = SizedBox(
264+
width: width,
265+
height: height,
266+
child: field,
267+
);
260268

261269
return field;
262270
}

0 commit comments

Comments
 (0)