fix flagdecoration
This commit is contained in:
@@ -118,8 +118,9 @@ class _MyAppState extends State<MyApp> {
|
|||||||
favorite: ['+39', 'FR'],
|
favorite: ['+39', 'FR'],
|
||||||
countryFilter: ['IT', 'FR'],
|
countryFilter: ['IT', 'FR'],
|
||||||
// flag can be styled with BoxDecoration's `borderRadius` and `shape` fields
|
// flag can be styled with BoxDecoration's `borderRadius` and `shape` fields
|
||||||
flagDecoration:
|
flagDecoration: BoxDecoration(
|
||||||
BoxDecoration(borderRadius: BorderRadius.circular(7)),
|
borderRadius: BorderRadius.circular(7),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 400,
|
width: 400,
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class CountryCodePicker extends StatefulWidget {
|
|||||||
final bool showDropDownButton;
|
final bool showDropDownButton;
|
||||||
|
|
||||||
/// [BoxDecoration] for the flag image
|
/// [BoxDecoration] for the flag image
|
||||||
final Decoration flagDecoration;
|
final Decoration? flagDecoration;
|
||||||
|
|
||||||
CountryCodePicker({
|
CountryCodePicker({
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
@@ -302,6 +302,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
|
|||||||
barrierColor: widget.barrierColor,
|
barrierColor: widget.barrierColor,
|
||||||
hideSearch: widget.hideSearch,
|
hideSearch: widget.hideSearch,
|
||||||
closeIcon: widget.closeIcon,
|
closeIcon: widget.closeIcon,
|
||||||
|
flagDecoration: widget.flagDecoration,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
this.barrierColor,
|
this.barrierColor,
|
||||||
this.hideSearch = false,
|
this.hideSearch = false,
|
||||||
this.closeIcon,
|
this.closeIcon,
|
||||||
}) : assert(searchDecoration != null, 'searchDecoration must not be null!'),
|
}) : this.searchDecoration = searchDecoration.prefixIcon == null
|
||||||
this.searchDecoration = searchDecoration.prefixIcon == null
|
|
||||||
? searchDecoration.copyWith(prefixIcon: Icon(Icons.search))
|
? searchDecoration.copyWith(prefixIcon: Icon(Icons.search))
|
||||||
: searchDecoration,
|
: searchDecoration,
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|||||||
Reference in New Issue
Block a user