flutter 隐藏 TextField在限制maxLength时,右下方出现的字符计数
如下图:
TextField(
maxLength: 11,
decoration: InputDecoration(
labelText: '请输入您的手机号',
),
),
解决:
在 InputDecoration 里添加 counterText 键, 值为空
TextField(
maxLength: 11,
decoration: InputDecoration(
counterText: '',
labelText: '请输入您的手机号',
),
),
效果: