【发布时间】:2023-03-27 00:06:01
【问题描述】:
我正在使用导入的 PinPut Flutter 包,我正在尝试修复右侧溢出的 pinput。我尝试将 eachFieldWidth 和 eachFieldHeight 设置为最小值,但没有任何区别。
return PinPut(
fieldsCount: 6,
textStyle: const TextStyle(fontSize: 25.0),
eachFieldWidth: 40.0,
eachFieldHeight: 40.0,
focusNode: _pinPutFocusNode,
controller: _pinPutController,
submittedFieldDecoration: pinPutDecoration,
selectedFieldDecoration: pinPutDecoration,
followingFieldDecoration: pinPutDecoration,
pinAnimationType: PinAnimationType.fade,}
【问题讨论】:
-
尝试将其包装在展开的小部件中
-
谢谢,但它不起作用
-
你可以试试这个代码
. eachFieldWidth:MediaQuery.of(context).size.width/5.9 -
响应式宽度我试过了,还是一样
-
发布更新:通过在框约束中设置最小高度和宽度,pinput 字段不再溢出。