Skip to content

Commit 0d79019

Browse files
committed
Formatters & Validators #17
1 parent 55033d5 commit 0d79019

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/src/transformers/node_transformers/passive_text_field_transformer.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ class _PassiveTextFieldWidgetState extends State<PassiveTextFieldWidget> {
247247
readOnly: readOnly,
248248
showCursor: showCursor,
249249
keyboardType: keyboardType,
250+
textInputAction:
251+
widget.node.properties.textInputAction.flutterTextInputAction,
250252
selectionHeightStyle: properties.selectionHeightStyle.toFlutter(),
251253
selectionWidthStyle: properties.selectionWidthStyle.toFlutter(),
252254
textAlign: properties.textAlign.toFlutter(),

lib/src/utils/extensions.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,3 +1839,21 @@ extension AutovalidateModeCExt on AutovalidateModeC {
18391839
AutovalidateMode.onUserInteraction,
18401840
};
18411841
}
1842+
1843+
extension TextInputActionCExt on TextInputActionC {
1844+
TextInputAction get flutterTextInputAction => switch (this) {
1845+
TextInputActionC.none => TextInputAction.none,
1846+
TextInputActionC.unspecified => TextInputAction.unspecified,
1847+
TextInputActionC.done => TextInputAction.done,
1848+
TextInputActionC.go => TextInputAction.go,
1849+
TextInputActionC.search => TextInputAction.search,
1850+
TextInputActionC.send => TextInputAction.send,
1851+
TextInputActionC.next => TextInputAction.next,
1852+
TextInputActionC.previous => TextInputAction.previous,
1853+
TextInputActionC.continueAction => TextInputAction.continueAction,
1854+
TextInputActionC.join => TextInputAction.join,
1855+
TextInputActionC.route => TextInputAction.route,
1856+
TextInputActionC.emergencyCall => TextInputAction.emergencyCall,
1857+
TextInputActionC.newline => TextInputAction.newline,
1858+
};
1859+
}

0 commit comments

Comments
 (0)