diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index 372573a..d444c79 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -265,6 +265,7 @@ class CountryCodePickerState extends State { flagWidth: widget.flagWidth, size: widget.dialogSize, backgroundColor: widget.dialogBackgroundColor, + barrierColor: widget.barrierColor, hideSearch: widget.hideSearch, closeIcon: widget.closeIcon, ), diff --git a/lib/selection_dialog.dart b/lib/selection_dialog.dart index 9859e49..1b7f883 100644 --- a/lib/selection_dialog.dart +++ b/lib/selection_dialog.dart @@ -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 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 { 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