【发布时间】:2019-02-17 12:49:55
【问题描述】:
我最近刚刚接触到颤振,到目前为止我很喜欢它,但我一直卡在一些 UI 更改上。任何帮助表示赞赏!
我的目标是得到一个圆形按钮,它有一个蓝色背景的图标,但在外面有一个深蓝色的边框。附上图片。
我的做法是:
- 获得一个圆形蓝色按钮。
- 在该按钮中放置一个图标。
- 添加边框。
我被困在第 3 步,因为我不知道如何添加边框,或者考虑到我解决问题的方式是否有可能。具体的颜色暂时对我来说无所谓,稍后我会改变主题。
这是我目前拥有的代码:
var messageBtn = new Row(
children: <Widget>[
new Padding(
padding: const EdgeInsets.all(20.0),
child: new RawMaterialButton(
onPressed: _messages,
child: new Padding(
padding: const EdgeInsets.all(20.0),
child: new Icon(
Icons.message,
size: 30.0,
color: Colors.white,
),
),
shape: new CircleBorder(),
fillColor: Colors.deepPurple,
),
),
new Padding(
padding: const EdgeInsets.all(8.0),
child: new Text(
'Send Messages',
style: new TextStyle(
fontSize: 20.0,
),
)),
],
);
它产生这个:see screenshot
我想要这个:see second screenshot
【问题讨论】:
标签: button dart icons flutter border