Skip to content

How to set searchTextHintStyle #158

Answered by Daniel-Ioannou
Abdusamad98 asked this question in Q&A
Discussion options

You must be logged in to vote

@Abdusamad98 The search field is fully customizable in showCountryPicker by providing the inputDecoration and searchTextStyle properties inCountryListThemeData.

For example:

showCountryPicker(
  context: context,
  onSelect: (Country country) {
    print('Select country: ${country.displayName}');
  },
  countryListTheme: CountryListThemeData(
    // Customize the search field using inputDecoration and searchTextStyle.
    inputDecoration: InputDecoration(
      labelText: 'Search 1',
      hintText: 'Start typing to search',
      hintStyle: TextStyle(fontSize: 16, color: Colors.blueAccent),
      prefixIcon: const Icon(Icons.search),
      border: OutlineInputBorder(
        borderSide: B…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Daniel-Ioannou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #136 on May 11, 2024 09:45.