CountryCodePicker constructor

const CountryCodePicker({
  1. ValueChanged<CountryCode>? onChanged,
  2. ValueChanged<CountryCode?>? onInit,
  3. String? initialSelection,
  4. List<String> favorite = const [],
  5. TextStyle? textStyle,
  6. EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
  7. bool showCountryOnly = false,
  8. InputDecoration searchDecoration = const InputDecoration(),
  9. TextStyle? searchStyle,
  10. TextStyle? dialogTextStyle,
  11. WidgetBuilder? emptySearchBuilder,
  12. bool showOnlyCountryWhenClosed = false,
  13. bool alignLeft = false,
  14. bool showFlag = true,
  15. bool? showFlagDialog,
  16. bool hideMainText = false,
  17. bool? showFlagMain,
  18. Decoration? flagDecoration,
  19. dynamic builder(
    1. CountryCode?
    )?,
  20. double flagWidth = 32.0,
  21. bool enabled = true,
  22. TextOverflow textOverflow = TextOverflow.ellipsis,
  23. Color? barrierColor,
  24. Color? backgroundColor,
  25. BoxDecoration? boxDecoration,
  26. Comparator<CountryCode>? comparator,
  27. List<String>? countryFilter,
  28. bool hideSearch = false,
  29. bool showDropDownButton = false,
  30. Size? dialogSize,
  31. Color? dialogBackgroundColor,
  32. Icon closeIcon = const Icon(Icons.close),
  33. List<Map<String, String>> countryList = codes,
  34. Key? key,
})

Implementation

const CountryCodePicker({
  this.onChanged,
  this.onInit,
  this.initialSelection,
  this.favorite = const [],
  this.textStyle,
  this.padding = const EdgeInsets.all(8.0),
  this.showCountryOnly = false,
  this.searchDecoration = const InputDecoration(),
  this.searchStyle,
  this.dialogTextStyle,
  this.emptySearchBuilder,
  this.showOnlyCountryWhenClosed = false,
  this.alignLeft = false,
  this.showFlag = true,
  this.showFlagDialog,
  this.hideMainText = false,
  this.showFlagMain,
  this.flagDecoration,
  this.builder,
  this.flagWidth = 32.0,
  this.enabled = true,
  this.textOverflow = TextOverflow.ellipsis,
  this.barrierColor,
  this.backgroundColor,
  this.boxDecoration,
  this.comparator,
  this.countryFilter,
  this.hideSearch = false,
  this.showDropDownButton = false,
  this.dialogSize,
  this.dialogBackgroundColor,
  this.closeIcon = const Icon(Icons.close),
  this.countryList = codes,
  Key? key,
}) : super(key: key);