From 0a873bd7e9061ec64bf178589df9d28bc6404725 Mon Sep 17 00:00:00 2001 From: Shahan <130090437+ShahanMalik@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:56:44 +0500 Subject: [PATCH] Update selection_dialog.dart add isFocused property in textfield --- lib/src/selection_dialog.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/selection_dialog.dart b/lib/src/selection_dialog.dart index 46cc466..6252649 100644 --- a/lib/src/selection_dialog.dart +++ b/lib/src/selection_dialog.dart @@ -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 { Padding( padding: widget.searchPadding, child: TextField( + autofocus: widget.isFocused ?? false, style: widget.searchStyle, decoration: widget.searchDecoration, onChanged: _filterElements,