TextField中文字和兩邊的icon都不對齊,文字整體向下偏移,查閱了大量文案,給出的解決方案大致是:
TextField( decoration: InputDecoration( contentPadding: EdgeInsets.all(0), border: InputBorder.none, hintText: hintText), ),
即:
在 InputDecoration里面加入
border: InputBorder.none
或者
border: OutlineInputBorder(
borderSide: BorderSide.none
)
兩種方案有的有效,有的卻是無效,不妨都可以試試
( 反正我的是沒生效😿 )
推薦文章:https://blog.csdn.net/qq_35547137/article/details/109367095