Skip to content

Commit

Permalink
Formatters & Validators #17
Browse files Browse the repository at this point in the history
  • Loading branch information
BirjuVachhani committed Jul 10, 2024
1 parent 55033d5 commit 0d79019
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ class _PassiveTextFieldWidgetState extends State<PassiveTextFieldWidget> {
readOnly: readOnly,
showCursor: showCursor,
keyboardType: keyboardType,
textInputAction:
widget.node.properties.textInputAction.flutterTextInputAction,
selectionHeightStyle: properties.selectionHeightStyle.toFlutter(),
selectionWidthStyle: properties.selectionWidthStyle.toFlutter(),
textAlign: properties.textAlign.toFlutter(),
Expand Down
18 changes: 18 additions & 0 deletions lib/src/utils/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1839,3 +1839,21 @@ extension AutovalidateModeCExt on AutovalidateModeC {
AutovalidateMode.onUserInteraction,
};
}

extension TextInputActionCExt on TextInputActionC {
TextInputAction get flutterTextInputAction => switch (this) {
TextInputActionC.none => TextInputAction.none,
TextInputActionC.unspecified => TextInputAction.unspecified,
TextInputActionC.done => TextInputAction.done,
TextInputActionC.go => TextInputAction.go,
TextInputActionC.search => TextInputAction.search,
TextInputActionC.send => TextInputAction.send,
TextInputActionC.next => TextInputAction.next,
TextInputActionC.previous => TextInputAction.previous,
TextInputActionC.continueAction => TextInputAction.continueAction,
TextInputActionC.join => TextInputAction.join,
TextInputActionC.route => TextInputAction.route,
TextInputActionC.emergencyCall => TextInputAction.emergencyCall,
TextInputActionC.newline => TextInputAction.newline,
};
}

0 comments on commit 0d79019

Please sign in to comment.