【发布时间】:2021-04-22 21:34:21
【问题描述】:
进入OTP时没有光标,如何在pinFieldAutoFill中添加光标。我正在使用 sms_autofill: ^1.2.5 包。
PinFieldAutoFill(
autofocus: true,
keyboardType: TextInputType.number,
decoration: UnderlineDecoration(
textStyle: TextStyle(
fontSize: 44.sp,
fontWeight: FontWeight.bold,
color: kDarkBlue),
colorBuilder: FixedColorBuilder(
Colors.grey),
),
currentCode: authService
.loginMobileOTP, // prefill with a code
onCodeSubmitted: (_) async {
authService.login(
context, _scaffoldKey);
},
onCodeChanged: (value) {
authService.loginMobileOTP =
value;
},
codeLength:
6 //code length, default 6
),
【问题讨论】:
-
这个问题解决了吗?寻找类似的解决方案。
标签: flutter flutter-layout flutter-packages fluttermap