直播app开发搭建,flutter 实现自适应、自动换行、相对布局
直播app开发搭建,flutter 实现自适应、自动换行、相对布局
Android实现:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="文本1内容很长" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="文本2紧靠右侧" />
</LinearLayout>
flutter实现代码:
Row(
children: [Flexible(child: Text("内容很长")), Text("[紧靠右侧]")],
)
接下来内容:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
IntrinsicWidth(
child:
Row(children: [Expanded(child: Text("文本1内容很长内容")), Text("文本2紧靠右侧")]))
])
以上就是直播app开发搭建,flutter 实现自适应、自动换行、相对布局, 更多内容欢迎关注之后的文章