Skip to content

Commit

Permalink
add cursor to PinInputTextField
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumard committed Apr 18, 2021
1 parent fbcb99c commit c83db51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/sms_autofill.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class PinFieldAutoFill extends StatefulWidget {
final Function(String?)? onCodeChanged;
final PinDecoration decoration;
final FocusNode? focusNode;
final Cursor? cursor;
final TextInputType keyboardType;
final TextInputAction textInputAction;

Expand All @@ -62,6 +63,7 @@ class PinFieldAutoFill extends StatefulWidget {
this.keyboardType = const TextInputType.numberWithOptions(),
this.textInputAction = TextInputAction.done,
this.focusNode,
this.cursor,
this.controller,
this.decoration = const UnderlineDecoration(
colorBuilder: FixedColorBuilder(Colors.black), textStyle: TextStyle(color: Colors.black)),
Expand Down Expand Up @@ -90,6 +92,7 @@ class _PinFieldAutoFillState extends State<PinFieldAutoFill> with CodeAutoFill {
focusNode: widget.focusNode,
enableInteractiveSelection: true,
autocorrect: false,
cursor: widget.cursor,
autofillHints: const <String>[AutofillHints.oneTimeCode],
textCapitalization: TextCapitalization.none,
toolbarOptions: ToolbarOptions(paste: true),
Expand Down

0 comments on commit c83db51

Please sign in to comment.