Skip to content

Commit bc3cd98

Browse files
authored
Merge pull request #60 from ShahanMalik/patch-2
Update selection_dialog.dart
2 parents f800e93 + 0a873bd commit bc3cd98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/selection_dialog.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class SelectionDialog extends StatefulWidget {
1010
final bool? showCountryOnly;
1111
final InputDecoration searchDecoration;
1212
final TextStyle? searchStyle;
13+
final bool? isFocused;
1314
final TextStyle? textStyle;
1415
final TextStyle headerTextStyle;
1516
final BoxDecoration? boxDecoration;
@@ -50,6 +51,7 @@ class SelectionDialog extends StatefulWidget {
5051
required this.headerTextStyle,
5152
InputDecoration searchDecoration = const InputDecoration(),
5253
this.searchStyle,
54+
this.isFocused,
5355
this.textStyle,
5456
required this.topBarPadding,
5557
this.headerText,
@@ -132,6 +134,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
132134
Padding(
133135
padding: widget.searchPadding,
134136
child: TextField(
137+
autofocus: widget.isFocused ?? false,
135138
style: widget.searchStyle,
136139
decoration: widget.searchDecoration,
137140
onChanged: _filterElements,

0 commit comments

Comments
 (0)