我最近刚开始 flutter ,到目前为止我很喜欢它,但我被一些用户界面的改变搞得焦头烂额.如有任何帮助,我们将不胜感激!
我的目标是得到一个圆形按钮,它有一个蓝色背景的图标,但在外面有一个深蓝色的边框.附有照片.
我的做法是:
- 得到一个圆形的蓝色按钮.
- 在那个按钮上放一个图标.
- 添加边框.
我被困在步骤3,因为我不知道如何添加边框,或者考虑到我处理问题的方式,这是否可能.具体的 colored颜色 现在对我来说并不重要,我稍后会改变主题.
这是我目前掌握的代码智慧:
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美元