Fliggy-Mobile / fsuper

A super powerful widget to help developers build complex views quickly and comfortably.
Other
515 stars 43 forks source link

child 没有设置指定大小就会压缩到最小,比如text #3

Closed ToZhanChi closed 4 years ago

ToZhanChi commented 4 years ago

text 不指定,child1有widget并且小于child2的尺寸,child2的就会被挤压

chenBingX commented 4 years ago

在目前的设计中,对 child1child2 的位置确定,是基于主要内容区域确定。如设置 textpadding、或者 widthheight 等。所以主要内容区域是要有一个大小的哦。

ToZhanChi commented 4 years ago

但是聊天消息框是无大小的

chenBingX commented 4 years ago

有文字也可以的,相当于设置了大小,需要具体看使用场对属性进行相应的配置哦

limhGeek commented 4 years ago

消息列表的时候多行文字会导致maxWidth失效吗?

chenBingX commented 4 years ago

理论上 maxWidth 会对最大允许宽度限制。在你的场景中发生了失效吗?

kcchenkd commented 4 years ago

It seems that maxWidth does not work for me. The msgBoxWidth is about 2/3 of screen width, so the last message should be wrapped. Any idea? Thanks!

Capture FSuper(padding: const EdgeInsets.fromLTRB(16.0, 12.0, 16.0, 12.0), maxWidth: _msgBoxWidth, backgroundColor: bgColor, corner: corner, margin: margin, text: msg.content))

chenBingX commented 4 years ago

在最新的 2.0.2 版本中,这个问题得到了修正。 欢迎保持对 FWidget 的关注哦。