showCountrySelectorDialog method Null safety

Future<Country?> showCountrySelectorDialog(
  1. BuildContext context,
  2. List<Country> countries
)

shows a Dialog with list countries if the PhoneInputSelectorType.DIALOG is selected

Implementation

Future<Country?> showCountrySelectorDialog(
    BuildContext context, List<Country> countries) {
  return showDialog<Country>(
    context: context,
    barrierDismissible: true,
    builder: (BuildContext context) => Material(
      color: Colors.transparent,
      child: Container(
        padding: EdgeInsets.all(8),
        decoration: BoxDecoration(
            color: Colors.black,
            borderRadius: BorderRadius.all(Radius.circular(16)),
            border: Border.all(color: Colors.grey.shade900, width: 4)),
        margin: EdgeInsets.symmetric(vertical: 40, horizontal: 16),
        child: CountrySearchListWidget(
          countries,
          locale,
          searchBoxDecoration: searchBoxDecoration,
          showFlags: selectorConfig.showFlags,
          useEmoji: selectorConfig.useEmoji,
          autoFocus: autoFocusSearchField,
          color: Colors.black,
        ),
      ),
    ),
  );
}