Adds background color to selection dialog

This commit is contained in:
Gloria Ngo
2020-11-26 21:16:50 -05:00
parent c283da595f
commit 3cd61a0b9e
2 changed files with 10 additions and 1 deletions

View File

@@ -16,6 +16,9 @@ class SelectionDialog extends StatefulWidget {
final bool hideSearch;
final Icon closeIcon;
/// Background color of SelectionDialog
final Color backgroundColor;
/// elements passed as favorite
final List<CountryCode> favoriteElements;
@@ -32,6 +35,7 @@ class SelectionDialog extends StatefulWidget {
this.showFlag,
this.flagWidth = 32,
this.size,
this.backgroundColor,
this.hideSearch = false,
this.closeIcon,
}) : assert(searchDecoration != null, 'searchDecoration must not be null!'),
@@ -58,7 +62,7 @@ class _SelectionDialogState extends State<SelectionDialog> {
widget.size?.height ?? MediaQuery.of(context).size.height * 0.85,
decoration: widget.boxDecoration ??
BoxDecoration(
color: Colors.white,
color: widget.backgroundColor ?? Colors.white,
borderRadius: BorderRadius.all(Radius.circular(25.0)),
boxShadow: [
BoxShadow(