Update selection_dialog.dart
add isFocused property in textfield
This commit is contained in:
@@ -9,6 +9,7 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
final bool? showCountryOnly;
|
final bool? showCountryOnly;
|
||||||
final InputDecoration searchDecoration;
|
final InputDecoration searchDecoration;
|
||||||
final TextStyle? searchStyle;
|
final TextStyle? searchStyle;
|
||||||
|
final bool? isFocused;
|
||||||
final TextStyle? textStyle;
|
final TextStyle? textStyle;
|
||||||
final TextStyle headerTextStyle;
|
final TextStyle headerTextStyle;
|
||||||
final BoxDecoration? boxDecoration;
|
final BoxDecoration? boxDecoration;
|
||||||
@@ -49,6 +50,7 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
required this.headerTextStyle,
|
required this.headerTextStyle,
|
||||||
InputDecoration searchDecoration = const InputDecoration(),
|
InputDecoration searchDecoration = const InputDecoration(),
|
||||||
this.searchStyle,
|
this.searchStyle,
|
||||||
|
this.isFocused,
|
||||||
this.textStyle,
|
this.textStyle,
|
||||||
required this.topBarPadding,
|
required this.topBarPadding,
|
||||||
this.headerText,
|
this.headerText,
|
||||||
@@ -125,6 +127,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: widget.searchPadding,
|
padding: widget.searchPadding,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autofocus: widget.isFocused ?? false,
|
||||||
style: widget.searchStyle,
|
style: widget.searchStyle,
|
||||||
decoration: widget.searchDecoration,
|
decoration: widget.searchDecoration,
|
||||||
onChanged: _filterElements,
|
onChanged: _filterElements,
|
||||||
|
|||||||
Reference in New Issue
Block a user