专业的编程技术博客社区

网站首页 > 博客文章 正文

Flutter基础widgets教程-ButtonBar篇

baijin 2024-08-29 12:31:11 博客文章 7 ℃ 0 评论

1 ButtonBar

ButtonBar 可以默认实现一个按钮组,通过 children 属性可以传入多个 Button。

2 构造函数

const ButtonBar({
 Key key,
 this.alignment = MainAxisAlignment.end,
 this.mainAxisSize = MainAxisSize.max,
 this.children = const <Widget>[],
})

3 常用属性

3.1 alignment:子child的对齐方式

alignment:MainAxisAlignment.end,

3.2 MainAxisSize:在主轴方向占有空间的值

mainAxisSize: MainAxisSize.max,

3.3 children:子控件

children: <Widget>[],

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表