GeoPickerTheme constructor

const GeoPickerTheme({
  1. Color? backgroundColor,
  2. Color? headerColor,
  3. TextStyle? headerTextStyle,
  4. Color? headerIconColor,
  5. Color? searchBarColor,
  6. TextStyle? searchTextStyle,
  7. TextStyle? searchHintStyle,
  8. Color? searchIconColor,
  9. Color? searchBarBorderColor,
  10. BorderRadius? searchBarBorderRadius,
  11. Color? searchCursorColor,
  12. Color? searchFocusedBorderColor,
  13. EdgeInsetsGeometry? searchContentPadding,
  14. InputDecoration? searchInputDecoration,
  15. Color? itemBackgroundColor,
  16. Color? itemSelectedColor,
  17. Color? itemSelectedBorderColor,
  18. Color? itemSelectedIconColor,
  19. BorderRadius? itemBorderRadius,
  20. EdgeInsetsGeometry? itemContentPadding,
  21. TextStyle? itemNameTextStyle,
  22. TextStyle? itemSelectedNameTextStyle,
  23. TextStyle? itemSubtitleTextStyle,
  24. TextStyle? dialogOptionTextStyle,
  25. Color? borderColor,
  26. BorderRadius? borderRadius,
  27. double? scrollbarThickness,
  28. Radius? scrollbarRadius,
  29. Color? shadowColor,
  30. double? elevation,
  31. IconData? closeIcon,
  32. IconData? searchIcon,
  33. IconData? clearIcon,
  34. IconData? selectedIcon,
  35. Widget? selectedIconWidget,
  36. double? selectedIconSize,
  37. IconData? emptyStateIcon,
  38. TextStyle? emptyStateTextStyle,
})

Comprehensive theme configuration shared by StatePicker and CityPicker.

Every visual aspect (colors, borders, radii, typography, icons) can be overridden. Omitted fields fall back to sensible defaults pulled from the ambient ThemeData.

StatePicker(
  countryIso2: 'US',
  theme: GeoPickerTheme(
    backgroundColor: Colors.white,
    headerTextStyle: TextStyle(fontWeight: FontWeight.w700),
    itemSelectedColor: Colors.blue.shade50,
  ),
)

Implementation

const GeoPickerTheme({
  this.backgroundColor,
  this.headerColor,
  this.headerTextStyle,
  this.headerIconColor,
  this.searchBarColor,
  this.searchTextStyle,
  this.searchHintStyle,
  this.searchIconColor,
  this.searchBarBorderColor,
  this.searchBarBorderRadius,
  this.searchCursorColor,
  this.searchFocusedBorderColor,
  this.searchContentPadding,
  this.searchInputDecoration,
  this.itemBackgroundColor,
  this.itemSelectedColor,
  this.itemSelectedBorderColor,
  this.itemSelectedIconColor,
  this.itemBorderRadius,
  this.itemContentPadding,
  this.itemNameTextStyle,
  this.itemSelectedNameTextStyle,
  this.itemSubtitleTextStyle,
  this.dialogOptionTextStyle,
  this.borderColor,
  this.borderRadius,
  this.scrollbarThickness,
  this.scrollbarRadius,
  this.shadowColor,
  this.elevation,
  this.closeIcon,
  this.searchIcon,
  this.clearIcon,
  this.selectedIcon,
  this.selectedIconWidget,
  this.selectedIconSize,
  this.emptyStateIcon,
  this.emptyStateTextStyle,
});