flutter - 如何在下面的代码中为自定义FlatButton制作边框 “thicker”?

标签 flutter user-interface dart button

SizedBox(
            width: double.infinity,
            child: FlatButton(
                onPressed: () do something
                child: Padding(
                  padding: const EdgeInsets.only(
                      left: 50.0, right: 50.0, top: 50.0),
                  child: Container(
                    height: 50.0,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(30.0),
                        color: Colors.transparent,
                        border: Border.all(color: Color(0xFFF4CAF50))),
                    child: Center(
                        child: Text(
                      "Password Login",
                      style: TextStyle(
                          color: Color(0xFFF4CAF50),
                          fontSize: 17.0,
                          fontWeight: FontWeight.w400,
                          fontFamily: "Poppins",
                          letterSpacing: 1.5),
                    )),
                  ),
                )),
          ),
该按钮的轮廓很细,在浅色背景上不清楚。我希望它在白色背景上更加突出。我可以增加文本的粗细,但不确定如何使边框更粗或更粗。

最佳答案

在border.all()中使用width属性

border.all(
width:2,
color:Colors.blue,
),

关于flutter - 如何在下面的代码中为自定义FlatButton制作边框 “thicker”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63456173/

相关文章:

unit-testing - 测试框架意外退出 - Mac 上的 Dart 项目

android - 警告 : [options] source value 7 is obsolete and will be removed in a future release

firebase - 我导航到屏幕后,signOut()不起作用..但是当我不导航时,它可以工作..如何解决此问题?

Java Swing - 如何暂停方法并等待按键?

java - 在 Eclipse 中触发 gui 更新(表未按应有的方式扩展)

flutter - 如何在 Flutter 中使用 AnimatedList Widget

dart - 带有剪辑椭圆的 flutter 圆形文件图像

flutter - 如何将一列小部件紧紧包裹在卡片内?

firebase - 最好使用哪种登录方法?

algorithm - UI 应用程序背后的设计模式(任何书籍?)