gpt4 book ai didi

flutter - 如何在 flutter 中制作带有边框半径的文本字段???

转载 作者:IT王子 更新时间:2023-10-29 06:50:00 26 4
gpt4 key购买 nike

我想在 flutter 中为这个文本字段添加边框半径。我的代码是

 new Container(
padding: const EdgeInsets.only(bottom: 10.0, top: 20.0),
child: new Opacity(
opacity: 0.7,
child: new TextField(
style: new TextStyle(
fontSize: 18.0,
height: 1.1,
color: Colors.white,
fontFamily: 'Akrobat-Bold'),
decoration: InputDecoration(
filled: true,
fillColor: const Color(0xFF808285),
hintStyle: TextStyle(
color: Colors.white, fontFamily: 'Akrobat-Bold'),
border: InputBorder.none,
hintText: 'User ID'),
)),
),

提前致谢。

最佳答案

你可以使用OutlineInputBorder

TextField(
decoration: InputDecoration(
border: UnderlineInputBorder(
borderRadius:BorderRadius.circular(5.0)),
hintText: 'Please enter a search term'
),
);

关于flutter - 如何在 flutter 中制作带有边框半径的文本字段???,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51404786/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com