Skip to content

Commit 54a8dbd

Browse files
committed
Text field and code-gen improvements
- Fix code-gen not generating expands and maxLines code properly. - Fix text field counter text not working properly. - Remove FittedBox from scaffold codegen. - Add showCounter prop for input decoration. - Fix text field with incorrect sizing in codegen.
1 parent ce898e3 commit 54a8dbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/transformers/node_transformers/passive_text_field_transformer.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class PassiveTextFieldTransformer extends NodeWidgetTransformer<TextFieldNode> {
7272

7373
static InputDecoration getDecoration(
7474
BuildContext context,
75-
BaseNode node,
75+
TextFieldNode node,
7676
InputDecorationModel decoration,
7777
bool useIconFonts, [
7878
WidgetBuildSettings settings = const WidgetBuildSettings(),
@@ -120,7 +120,7 @@ class PassiveTextFieldTransformer extends NodeWidgetTransformer<TextFieldNode> {
120120
suffixStyle: getTextStyle(decoration.suffixStyle),
121121
// suffixIconConstraints:
122122
// decoration.suffixIconConstraints.flutterConstraints,
123-
counterText: decoration.counterText,
123+
counterText: decoration.showCounter ? decoration.counterText : '',
124124
counterStyle: getTextStyle(decoration.counterStyle),
125125
filled: decoration.filled,
126126
fillColor: decoration.fillColor.toFlutterColor(),

0 commit comments

Comments
 (0)