[英]How to determine the amount of text that could fit on each page(child) of PageView widget, according to screen characteristics?
I am working on mobile app that represents a gamebook.我正在开发代表游戏本的移动应用程序。 It contains episodes and each of them is built of one or more pages of text.
它包含剧集,每一集都由一页或多页文本构成。 For every episode I use PageView with children Columns(with nested Text and RichText) for each page.
对于每一集,我对每个页面使用带有子列(带有嵌套文本和富文本)的 PageView。 The screen orientation is locked on portraitUp and the textScaleFactor - on 1.0.
屏幕方向锁定在 PortraitUp 和 textScaleFactor - 1.0 上。 The problems I found with this approach are related with the different screen characteristics of mobile devices:
我用这种方法发现的问题与移动设备的不同屏幕特性有关:
So, is there good approach to determine how much text to place on each page of the PageView and to scale the font size according to mobile device size and screen characteristics?那么,有没有好的方法来确定在 PageView 的每个页面上放置多少文本并根据移动设备大小和屏幕特征缩放字体大小? Also, I will appreciate if anyone suggest better way to compose such book-like mobile app with Flutter(using different set of widgets).
另外,如果有人提出更好的方法来使用 Flutter(使用不同的小部件集)编写这种类似书籍的移动应用程序,我将不胜感激。
Thanks for your time.谢谢你的时间。
@Milenb If you can add text pagination then I think it will solve your issue. @Milenb 如果您可以添加文本分页,那么我认为它会解决您的问题。 You wan't need to scale down/up on the basis of screen height.
您不需要根据屏幕高度缩小/放大。 If you look in to this thread then you will know how to do this.
如果您查看此线程,那么您将知道如何执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.