-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom theme for search box decoration not applied. #228
Comments
Need repro |
After checking again, I can't add custom style to the searchBoxDecoration. The code is missing the part where the custom style is applied to the page. At the end, I forked the repo and applied the style myself here. I had to assign the searchBoxDecoration and searchBoxTextStyle from the PageNavigator constructor. |
Can't you do it by changing the |
Doing this will just change the form field theme itself but not the search box inside the country selector page. |
I have forked the repo and applied it anyway. You can take a look at the pull request. |
So if I understand you correctly when wrapping the If that the case a workaround to explore is to pass the local theme into the overlay similar to how the locale is passed currently. As it is done here https://github.com/cedvdb/phone_form_field/blob/main/lib/src/country_selector_navigator.dart#L235 This fix would not add things to the public api of phone_form_fields and would therefor be prefered. So something like the pseudo code: return Localizations.override(
context: inputContext,
locale: Localizations.localeOf(inputContext),
child: Theme( // <== add this
data: Theme.of(inputContext),
child: CountrySelector.page(
// ...
),
),
) |
I tried to make the search box look different in CountrySelectorNavigator, but it's not working. When I checked the code, it seems like the search box design settings are not reaching the PageNavigator, which might be why it's not working.
The text was updated successfully, but these errors were encountered: