Update selection_dialog.dart
This commit is contained in:
@@ -13,6 +13,7 @@ class SelectionDialog extends StatefulWidget {
|
||||
final double flagWidth;
|
||||
final Size size;
|
||||
final bool hideSearch;
|
||||
final Icon closeIcon;
|
||||
|
||||
/// elements passed as favorite
|
||||
final List<CountryCode> favoriteElements;
|
||||
@@ -30,9 +31,11 @@ class SelectionDialog extends StatefulWidget {
|
||||
this.flagWidth = 32,
|
||||
this.size,
|
||||
this.hideSearch = false,
|
||||
this.closeIcon = closeIcon == null ? Icon(Icons.close) : closeIcon,
|
||||
}) : assert(searchDecoration != null, 'searchDecoration must not be null!'),
|
||||
this.searchDecoration =
|
||||
searchDecoration.copyWith(prefixIcon: Icon(Icons.search)),
|
||||
this.searchDecoration = searchDecoration.prefixIcon == null
|
||||
? searchDecoration.copyWith(prefixIcon: Icon(Icons.search))
|
||||
: searchDecoration,
|
||||
super(key: key);
|
||||
|
||||
@override
|
||||
@@ -72,9 +75,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
|
||||
IconButton(
|
||||
padding: const EdgeInsets.all(0),
|
||||
iconSize: 20,
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
),
|
||||
icon: closeIcon,
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
if (!widget.hideSearch)
|
||||
|
||||
Reference in New Issue
Block a user