CountryCodePickerModal constructor
const
CountryCodePickerModal({
- required bool localize,
- required Icon? favoritesIcon,
- required bool showSearchBar,
- required bool showDialCode,
- Widget? title,
- Color defaultAppbarBackgroundColor = Colors.white,
- Color defaultAppbarForegroundColor = Colors.black,
- Color defaultAppbarCloseIconBackgroundColor = const Color.fromARGB(255, 224, 224, 224),
- String defaultAppbarText = 'Select Country Code',
- IconData defaultAppbarCloseIcon = Icons.clear_rounded,
- String? focusedCountry,
- InputDecoration? searchBarDecoration,
- List<
String> favorites = const [], - List<
String> filteredCountries = const [], - TextStyle? countryTextStyle,
- TextStyle? dialCodeTextStyle,
- double? horizontalTitleGap,
- TextStyle? searchBarTextStyle,
- Key? key,
Widget that can be used on showing a modal as bottom sheet that contains all of the CountryCodes.
After pressing the CountryCode's ListTile, the widget pops and returns the selected CountryCode which can be manipulated.
Implementation
const CountryCodePickerModal({
required this.localize,
required this.favoritesIcon,
required this.showSearchBar,
required this.showDialCode,
this.title,
this.defaultAppbarBackgroundColor = Colors.white,
this.defaultAppbarForegroundColor = Colors.black,
this.defaultAppbarCloseIconBackgroundColor =
const Color.fromARGB(255, 224, 224, 224),
this.defaultAppbarText = 'Select Country Code',
this.defaultAppbarCloseIcon = Icons.clear_rounded,
this.focusedCountry,
this.searchBarDecoration,
this.favorites = const [],
this.filteredCountries = const [],
this.countryTextStyle,
this.dialCodeTextStyle,
this.horizontalTitleGap,
this.searchBarTextStyle,
super.key,
});