How to set searchTextHintStyle #158
Answered
by
Daniel-Ioannou
Abdusamad98
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
Daniel-Ioannou
Jan 29, 2024
Replies: 1 comment
-
@Abdusamad98 The search field is fully customizable in showCountryPicker by providing the 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: BorderSide(
color: const Color(0xFF8C98A8).withOpacity(0.2),
),
),
),
// Optional: Customize the text style of the search input.
searchTextStyle: TextStyle(
fontSize: 18,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
); |
Beta Was this translation helpful? Give feedback.
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
@Abdusamad98 The search field is fully customizable in showCountryPicker by providing the
inputDecoration
andsearchTextStyle
properties inCountryListThemeData.For example: