I'm building an app with React Native. The problem is that, when the font size is changed through the phone's settings, the font sizes also change in the app, even though they're all set a fixed font size.
For example, consider the following Text element with font size 12:
<Text style={{fontSize: 12}}>Hello World</Text>
I've found out that there's a prop named allowFontScaling for this issue.So, I go to App.js and add the following line for disabling the font scaling throughout the app:
Text.defaultProps.allowFontScaling = false;
It works perfectly. However, the same prop doesn't seem be not implemented for TextInput element. When I try doing the same for TextInput, I get the following error:
undefined is not an object (evaluating '_reactNative.TextInput.defaultProps.allowFontScaling = false')
Therefore, I may set a fixed font size for Text, but not TextInput. Is there any workaround for this issue? My react-native version is 0.48.4.
Thanks in advance.