如何停止电话中的默认字体大小,从影响Flutter应用程序内部的字体大小?
所以我制作了一个扑朔迷离的应用程序。我将所有字体大小定义为动态(按照屏幕尺寸正确渲染)。
一切都很好,直到我在使用较大字体尺寸的手机上打开应用程序(从设备设置中更改)。即使我对文本大小进行编程以动态渲染,但如果用户不使用手机的默认字体大小并将其保持更大的尺寸,则会失败。
现在,问题是,如何停止手机的字体大小(在设置中的文本大小内选择)来影响我的应用程序中的任何内容?无论设置如何,我都想渲染我在Flutter应用程序中定义的文本大小。
有办法做到吗?或者,如果无法阻止这一影响力的部分,我在这里还有哪些其他解决方案?
So I made a Flutter app. I defined all the font sizes to be dynamic (render properly as per the screen sizes).
Everything was working great until I opened the application on a phone which was using a larger font size (changed from within the device settings). Even though, I'd programmed my text size to render itself dynamically, it fails if the user is not using the phone's default font size and has kept it at a larger size.
Now, the question is, How do I stop the phone's font size (chosen within Text Size in Settings) to influence anything that is inside my app? I want to render the same text size that I've defined inside my flutter app, no matter what the settings are.
Is there a way to do it ? Or if there's no way to stop this influencing part, what other solutions do I have here ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以覆盖系统提供的文本量表因子:
如果您找到此答案作为帮助,请标记此答案
You can override the the text scale factor provided by the system like this:
if you find this answer as help please mark this answer as accepted