I want to be able to Preview TogiCountryCodePicker in my project so I can make quick edits to the UI. When I try, I get the same bug that shows up on TogiCountryCodePickerPreview in this file.
but then I just see a UI. If anyone knows how to mock the telephony service or even put a static variable in the country code field when in Preview mode... I'd love to be able to use the @Preview here. Thanks for a great codebase otherwise!
I feel like a simple static string could be set here
Hi @adrianegraphene 👋 You should be able to sidestep this issue in previews by setting either initialCountryIsoCode or initialCountryPhoneCode, can you try that and see if it meets your requirements?
I want to be able to Preview TogiCountryCodePicker in my project so I can make quick edits to the UI. When I try, I get the same bug that shows up on TogiCountryCodePickerPreview in this file.
ccp/src/main/java/com/togitech/ccp/component/TogiCountryCodePicker.kt
I can briefly work around it wrapping the TogiCountryCodePicker with
if (!LocalInspectionMode.current) {
and setting the @Preview to this
but then I just see a UI. If anyone knows how to mock the telephony service or even put a static variable in the country code field when in Preview mode... I'd love to be able to use the @Preview here. Thanks for a great codebase otherwise!
I feel like a simple static string could be set here
but I'm just not seeing it right now. Thought I'd leave this here for others to see / contribute / comment.