laomengflutter / flutter_verification_box Goto Github PK
View Code? Open in Web Editor NEW验证码输入框
License: Apache License 2.0
验证码输入框
License: Apache License 2.0
报错信息:
Error: The method 'WhitelistingTextInputFormatter' isn't defined for the class '_VerificationBox'.
Android手机,首次输入不显示光标,当输入错误时,重新唤起软键盘,删除重新输入验证码时,会出现光标
Launching lib\main.dart on LIO AN00 in debug mode...
Running Gradle task 'assembleDebug'...
/C:/src/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_verification_box-2.0.0/lib/src/verification_box.dart:196:9: Error: The method 'WhitelistingTextInputFormatter' isn't defined for the class '_VerificationBox'.
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 16s
Exception: Gradle task assembleDebug failed with exit code 1
VerificationBox 下的 WhitelistingTextInputFormatter 已经完全弃用,在flutter版本比较高的项目会报错
将
WhitelistingTextInputFormatter(RegExp("[0-9]")),
改为以下代码即可
FilteringTextInputFormatter.deny(RegExp(r'[0-9]')),
希望可以有一个选择,验证码是明文,密码是密文比如星号或圆点。
在小米手机上输入完成后,onSubmitted不会自动触发
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.