Match selection dialog box shadow with barrier color

This commit is contained in:
Gloria Ngo
2020-11-26 22:06:30 -05:00
parent 3cd61a0b9e
commit 930b8eb4ba
2 changed files with 6 additions and 1 deletions

View File

@@ -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,
),

View File

@@ -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