Skip to content

Commit 159ce61

Browse files
committed
Add support for TextInputType.numberWithOptions.
1 parent e6d4441 commit 159ce61

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

lib/src/api/nodes/grid_view_node.g.dart

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/api/nodes/text_field_node.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ class TextFieldProperties with SerializableMixin, EquatableMixin {
149149
/// Whether to show the cursor in the field.
150150
late bool showCursor;
151151

152+
/// Whether to show the decimal key in the soft input keyboard.
153+
late bool showDecimalKey;
154+
155+
/// Whether to show the sign key in the soft input keyboard.
156+
late bool showSignKey;
157+
152158
/// The type of keyboard that pops up when inputting text in the field.
153159
/// For example, if the field should only accept numbers, the keyboard type
154160
/// should be [TextInputTypeEnum.number].
@@ -228,6 +234,8 @@ class TextFieldProperties with SerializableMixin, EquatableMixin {
228234
TextProp? inputStyle,
229235
InputDecorationModel? decoration,
230236
this.expands = false,
237+
this.showDecimalKey = false,
238+
this.showSignKey = false,
231239
}) : inputStyle = inputStyle ??
232240
StartEndProp.general(fontSize: 14, fills: [PaintModel.blackPaint]),
233241
decoration = decoration ?? InputDecorationModel();
@@ -258,6 +266,8 @@ class TextFieldProperties with SerializableMixin, EquatableMixin {
258266
TextProp? inputStyle,
259267
InputDecorationModel? decoration,
260268
bool? expands,
269+
bool? showDecimalKey,
270+
bool? showSignKey,
261271
}) {
262272
return TextFieldProperties(
263273
autoCorrect: autoCorrect ?? this.autoCorrect,
@@ -284,6 +294,8 @@ class TextFieldProperties with SerializableMixin, EquatableMixin {
284294
inputStyle: inputStyle ?? this.inputStyle,
285295
decoration: decoration ?? this.decoration,
286296
expands: expands ?? this.expands,
297+
showDecimalKey: showDecimalKey ?? this.showDecimalKey,
298+
showSignKey: showSignKey ?? this.showSignKey,
287299
);
288300
}
289301

@@ -319,5 +331,7 @@ class TextFieldProperties with SerializableMixin, EquatableMixin {
319331
inputStyle,
320332
decoration,
321333
expands,
334+
showDecimalKey,
335+
showSignKey,
322336
];
323337
}

lib/src/api/nodes/text_field_node.g.dart

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)