Match selection dialog box shadow with barrier color
This commit is contained in:
@@ -265,6 +265,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
|
|||||||
flagWidth: widget.flagWidth,
|
flagWidth: widget.flagWidth,
|
||||||
size: widget.dialogSize,
|
size: widget.dialogSize,
|
||||||
backgroundColor: widget.dialogBackgroundColor,
|
backgroundColor: widget.dialogBackgroundColor,
|
||||||
|
barrierColor: widget.barrierColor,
|
||||||
hideSearch: widget.hideSearch,
|
hideSearch: widget.hideSearch,
|
||||||
closeIcon: widget.closeIcon,
|
closeIcon: widget.closeIcon,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
/// Background color of SelectionDialog
|
/// Background color of SelectionDialog
|
||||||
final Color backgroundColor;
|
final Color backgroundColor;
|
||||||
|
|
||||||
|
/// Boxshaow color of SelectionDialog that matches CountryCodePicker barrier color
|
||||||
|
final Color barrierColor;
|
||||||
|
|
||||||
/// elements passed as favorite
|
/// elements passed as favorite
|
||||||
final List<CountryCode> favoriteElements;
|
final List<CountryCode> favoriteElements;
|
||||||
|
|
||||||
@@ -36,6 +39,7 @@ class SelectionDialog extends StatefulWidget {
|
|||||||
this.flagWidth = 32,
|
this.flagWidth = 32,
|
||||||
this.size,
|
this.size,
|
||||||
this.backgroundColor,
|
this.backgroundColor,
|
||||||
|
this.barrierColor,
|
||||||
this.hideSearch = false,
|
this.hideSearch = false,
|
||||||
this.closeIcon,
|
this.closeIcon,
|
||||||
}) : assert(searchDecoration != null, 'searchDecoration must not be null!'),
|
}) : assert(searchDecoration != null, 'searchDecoration must not be null!'),
|
||||||
@@ -66,7 +70,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
|
|||||||
borderRadius: BorderRadius.all(Radius.circular(25.0)),
|
borderRadius: BorderRadius.all(Radius.circular(25.0)),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(1),
|
color: widget.barrierColor ?? Colors.grey.withOpacity(1),
|
||||||
spreadRadius: 5,
|
spreadRadius: 5,
|
||||||
blurRadius: 7,
|
blurRadius: 7,
|
||||||
offset: Offset(0, 3), // changes position of shadow
|
offset: Offset(0, 3), // changes position of shadow
|
||||||
|
|||||||
Reference in New Issue
Block a user