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/