Update selection_dialog.dart

add isFocused property in textfield
This commit is contained in:
Shahan
2025-07-22 16:56:44 +05:00
committed by GitHub
parent fbc4d9ea28
commit 0a873bd7e9

View File

@@ -9,6 +9,7 @@ class SelectionDialog extends StatefulWidget {
final bool? showCountryOnly;
final InputDecoration searchDecoration;
final TextStyle? searchStyle;
final bool? isFocused;
final TextStyle? textStyle;
final TextStyle headerTextStyle;
final BoxDecoration? boxDecoration;
@@ -49,6 +50,7 @@ class SelectionDialog extends StatefulWidget {
required this.headerTextStyle,
InputDecoration searchDecoration = const InputDecoration(),
this.searchStyle,
this.isFocused,
this.textStyle,
required this.topBarPadding,
this.headerText,
@@ -125,6 +127,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
Padding(
padding: widget.searchPadding,
child: TextField(
autofocus: widget.isFocused ?? false,
style: widget.searchStyle,
decoration: widget.searchDecoration,
onChanged: _filterElements,