如何在flutter中自动检测文本字段的otp文本 我没有得到任何合适的东西。 感谢andvance。
Center(
child: Padding(
padding: const EdgeInsets.only(top: 10.0),
child:TextField(
controller: otpController,
maxLength: 6,
maxLengthEnforced: true,
textAlign: TextAlign.center,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "_ _ _ _ _ _",
hintStyle: new TextStyle(
fontWeight: FontWeight.bold
)
// border:
// OutlineInputBorder(borderRadius: BorderRadius.circular(32.0))
),
style: new TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 22.0,
),
),
),
),