当前位置: 代码迷 >> 综合 >> flutter TextField 详解《边框、高度、背景色、圆角》
  详细解决方案

flutter TextField 详解《边框、高度、背景色、圆角》

热度:118   发布时间:2023-09-14 17:26:53.0
Expanded(child:ConstrainedBox(constraints: BoxConstraints(maxHeight: 40,), child: TextField(decoration: InputDecoration(contentPadding: EdgeInsets.fromLTRB(10, 0, 10, 15),fillColor: Color(0XFFFFF8F4),filled: true,enabledBorder: OutlineInputBorder(/*边角*/borderRadius: BorderRadius.all(Radius.circular(5), //边角为5),borderSide: BorderSide(color: Colors.white, //边线颜色为白色width: 1, //边线宽度为2),),focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, //边框颜色为白色width: 1, //宽度为5),borderRadius: BorderRadius.all(Radius.circular(5), //边角为30),),),),),),
  相关解决方案