showCountryCodePickerDialog method
void
showCountryCodePickerDialog()
Implementation
void showCountryCodePickerDialog() async {
final item = await showDialog(
barrierColor: widget.barrierColor ?? Colors.grey.withOpacity(0.5),
context: context,
builder: (context) => Center(
child: Dialog(
child: SelectionDialog(
elements,
favoriteElements,
showCountryOnly: widget.showCountryOnly,
emptySearchBuilder: widget.emptySearchBuilder,
searchDecoration: widget.searchDecoration,
searchStyle: widget.searchStyle,
textStyle: widget.dialogTextStyle,
boxDecoration: widget.boxDecoration,
showFlag: widget.showFlagDialog ?? widget.showFlag,
flagWidth: widget.flagWidth,
size: widget.dialogSize,
backgroundColor: widget.dialogBackgroundColor,
barrierColor: widget.barrierColor,
hideSearch: widget.hideSearch,
closeIcon: widget.closeIcon,
flagDecoration: widget.flagDecoration,
),
),
),
);
if (item != null) {
setState(() {
selectedItem = item;
});
_publishSelection(item);
}
}