Add search TextStyle property
This commit is contained in:
@@ -15,6 +15,7 @@ class CountryCodePicker extends StatefulWidget {
|
|||||||
final EdgeInsetsGeometry padding;
|
final EdgeInsetsGeometry padding;
|
||||||
final bool showCountryOnly;
|
final bool showCountryOnly;
|
||||||
final InputDecoration searchDecoration;
|
final InputDecoration searchDecoration;
|
||||||
|
final TextStyle searchStyle;
|
||||||
final WidgetBuilder emptySearchBuilder;
|
final WidgetBuilder emptySearchBuilder;
|
||||||
|
|
||||||
CountryCodePicker({
|
CountryCodePicker({
|
||||||
@@ -25,6 +26,7 @@ class CountryCodePicker extends StatefulWidget {
|
|||||||
this.padding = const EdgeInsets.all(0.0),
|
this.padding = const EdgeInsets.all(0.0),
|
||||||
this.showCountryOnly = false,
|
this.showCountryOnly = false,
|
||||||
this.searchDecoration,
|
this.searchDecoration,
|
||||||
|
this.searchStyle,
|
||||||
this.emptySearchBuilder,
|
this.emptySearchBuilder,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -118,6 +120,7 @@ class _CountryCodePickerState extends State<CountryCodePicker> {
|
|||||||
showCountryOnly: widget.showCountryOnly,
|
showCountryOnly: widget.showCountryOnly,
|
||||||
emptySearchBuilder: widget.emptySearchBuilder,
|
emptySearchBuilder: widget.emptySearchBuilder,
|
||||||
searchDecoration: widget.searchDecoration,
|
searchDecoration: widget.searchDecoration,
|
||||||
|
searchStyle: widget.searchStyle,
|
||||||
),
|
),
|
||||||
).then((e) {
|
).then((e) {
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
final List<CountryCode> elements;
|
final List<CountryCode> elements;
|
||||||
final bool showCountryOnly;
|
final bool showCountryOnly;
|
||||||
final InputDecoration searchDecoration;
|
final InputDecoration searchDecoration;
|
||||||
|
final TextStyle searchStyle;
|
||||||
final WidgetBuilder emptySearchBuilder;
|
final WidgetBuilder emptySearchBuilder;
|
||||||
|
|
||||||
/// elements passed as favorite
|
/// elements passed as favorite
|
||||||
@@ -16,6 +17,7 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
this.showCountryOnly,
|
this.showCountryOnly,
|
||||||
this.emptySearchBuilder,
|
this.emptySearchBuilder,
|
||||||
InputDecoration searchDecoration = const InputDecoration(),
|
InputDecoration searchDecoration = const InputDecoration(),
|
||||||
|
this.searchStyle,
|
||||||
}) :
|
}) :
|
||||||
this.searchDecoration = searchDecoration.copyWith(prefixIcon: Icon(Icons.search)),
|
this.searchDecoration = searchDecoration.copyWith(prefixIcon: Icon(Icons.search)),
|
||||||
super(key: key);
|
super(key: key);
|
||||||
@@ -33,6 +35,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
|
|||||||
title: Column(
|
title: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
TextField(
|
TextField(
|
||||||
|
style: widget.searchStyle,
|
||||||
decoration: widget.searchDecoration,
|
decoration: widget.searchDecoration,
|
||||||
onChanged: _filterElements,
|
onChanged: _filterElements,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user