Skip to content

Commit 1854f17

Browse files
authored
Allow TextField95 to specify alternate keyboard types. (#29)
1 parent d465427 commit 1854f17

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/src/text_field95.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TextField95 extends StatefulWidget {
1818
this.onSubmitted,
1919
this.inputFormatters,
2020
this.autofocus = false,
21+
this.keyboardType,
2122
});
2223

2324
final TextEditingController? controller;
@@ -30,6 +31,7 @@ class TextField95 extends StatefulWidget {
3031
final ValueChanged<String>? onChanged;
3132
final ValueChanged<String>? onSubmitted;
3233
final List<TextInputFormatter>? inputFormatters;
34+
final TextInputType? keyboardType;
3335
final bool autofocus;
3436

3537
@override
@@ -50,8 +52,10 @@ class _TextField95State extends State<TextField95> {
5052
child: TextField(
5153
controller: widget.controller,
5254
maxLines: widget.maxLines,
53-
keyboardType:
54-
widget.multiline ? TextInputType.multiline : TextInputType.text,
55+
keyboardType: widget.keyboardType ??
56+
(widget.multiline
57+
? TextInputType.multiline
58+
: TextInputType.text),
5559
decoration: const InputDecoration(
5660
isDense: true,
5761
border: InputBorder.none,

0 commit comments

Comments
 (0)