Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/src/models/input_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class InputOptions {
this.inputToolbarMargin = const EdgeInsets.only(top: 8.0),
this.cursorStyle = const CursorStyle(),
this.autocorrect = true,
this.keyboardType = TextInputType.none,
this.autofillHints,
});

/// Function to call when a mention is triggered in the input,
Expand Down Expand Up @@ -107,4 +109,11 @@ class InputOptions {

/// Whether to enable auto-correction. Defaults to true.
final bool autocorrect;

/// Keyboard type for mobile
final TextInputType keyboardType;

// Autofill hints for mobile keyboard
// eg. [AutofillHints.email, AutofillHints.username]
final List<String>? autofillHints;
}
2 changes: 2 additions & 0 deletions lib/src/widgets/input_toolbar/input_toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ class InputToolbarState extends State<InputToolbar>
});
},
autocorrect: widget.inputOptions.autocorrect,
keyboardType: widget.inputOptions.keyboardType,
autofillHints: widget.inputOptions.autofillHints,
),
),
),
Expand Down