diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index c979e12b..38b1f673 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -43,6 +43,8 @@ class CountryCodePicker extends StatefulWidget { /// Background color of selection dialog final Color? dialogBackgroundColor; + final Color? dialogBorderColor; + /// used to customize the country list final List? countryFilter; @@ -116,6 +118,7 @@ class CountryCodePicker extends StatefulWidget { this.showDropDownButton = false, this.dialogSize, this.dialogBackgroundColor, + this.dialogBorderColor, this.closeIcon = const Icon(Icons.close), this.countryList = codes, Key? key, @@ -285,7 +288,6 @@ class CountryCodePickerState extends State { if (!UniversalPlatform.isAndroid && !UniversalPlatform.isIOS) { showDialog( barrierColor: widget.barrierColor ?? Colors.grey.withOpacity(0.5), - // backgroundColor: widget.backgroundColor ?? Colors.transparent, context: context, builder: (context) => Center( child: Container( @@ -306,6 +308,7 @@ class CountryCodePickerState extends State { flagWidth: widget.flagWidth, size: widget.dialogSize, backgroundColor: widget.dialogBackgroundColor, + borderColor: widget.dialogBorderColor, barrierColor: widget.barrierColor, hideSearch: widget.hideSearch, closeIcon: widget.closeIcon, diff --git a/lib/selection_dialog.dart b/lib/selection_dialog.dart index 176d0ee2..58e41c04 100644 --- a/lib/selection_dialog.dart +++ b/lib/selection_dialog.dart @@ -24,6 +24,8 @@ class SelectionDialog extends StatefulWidget { /// Boxshaow color of SelectionDialog that matches CountryCodePicker barrier color final Color? barrierColor; + final Color? borderColor; + /// elements passed as favorite final List favoriteElements; @@ -43,6 +45,7 @@ class SelectionDialog extends StatefulWidget { this.size, this.backgroundColor, this.barrierColor, + this.borderColor, this.hideSearch = false, this.closeIcon, }) : this.searchDecoration = searchDecoration.prefixIcon == null @@ -69,15 +72,11 @@ class _SelectionDialogState extends State { decoration: widget.boxDecoration ?? BoxDecoration( color: widget.backgroundColor ?? Colors.white, + border: Border.all( + width: 3.0, + color: widget.borderColor ?? Colors.transparent, + ), borderRadius: BorderRadius.all(Radius.circular(8.0)), - boxShadow: [ - BoxShadow( - color: widget.barrierColor ?? Colors.grey.withOpacity(1), - spreadRadius: 5, - blurRadius: 7, - offset: Offset(0, 3), // changes position of shadow - ), - ], ), child: Column( mainAxisSize: MainAxisSize.min,