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