小编Uts*_*ave的帖子

Flutter 中的自定义按钮

我想要实现的目标如下: 按钮

我应该使用带有图标和文本的行吗?

这是我的代码及其输出


    RaisedButton(
          elevation: 10,
          onPressed: () {},
          color: Colors.white,
          child: Padding(
            padding: EdgeInsets.all(10),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                Container(
                  height: 55,
                  color: Colors.deepPurple,
                  child: Icon(
                    Icons.settings,
                    color: Colors.white,
                  ),
                ),
                Text(
                  'Settings',
                  style: TextStyle(
                    fontSize: 25,
                  ),
                ),
              ],
            ),
          ),
        );

Run Code Online (Sandbox Code Playgroud)

输出: 输出

任何帮助,将不胜感激。

button dart flutter

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

button ×1

dart ×1

flutter ×1