? 自定义密码屏幕
一个Flutter包,用于为您的移动应用程序添加具有自定义键盘和密码的屏幕。
? 安装
dependencies:
custom_pin_screen: "^0.3.0"
⚡️ 导入
import 'package:custom_pin_screen/custom_pin_screen.dart';
? 如何使用
Dart用法
- 密码认证
onPressed: (){
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PinAuthentication(
onChanged: (v) {
if (kDebugMode) {
print(v);
}
},
onSpecialKeyTap: () {},
specialKey: const SizedBox(),
useFingerprint: true,
onbuttonClick: () {},
submitLabel: const Text(
'Submit',
style: TextStyle(color: Colors.white, fontSize: 20),
),
),
),
);
},
- 自定义键盘
Column(
children: [
const Padding(
padding: EdgeInsets.symmetric(
horizontal: 35.0,
vertical: 35.0,
),
child: Text(
"How much do you want to fund your wallet with",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.blue,
fontWeight: FontWeight.w700,
fontSize: 18,
),
),
),
Expanded(
child: CustomAppKeyBoard(
onChanged: (v) {
if (kDebugMode) {
print(v);
}
},
onbuttonClick: () {
if (kDebugMode) {
print('clicked');
}
},
maxLength: 4,
submitLabel: const Text(
'Proceed',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 18,
),
),
// ),
))
],
)
有关更多信息,请参考示例中的 main.dart。
? 屏幕截图
![]() |
![]() |
? Bug/需求
如果您遇到任何问题,请随时打开一个 issue。如果您觉得库缺少某个功能,请在 Github 上提交一个 ticket,我会查看。也欢迎提交 Pull Request。
❗️ 注意
本项目是一个 Flutter 插件包的起点,该包包含 Android 和/或 iOS 的平台特定实现代码。
要开始使用 Flutter,请参阅我们的 在线文档,其中提供了教程、示例、有关移动开发的指南以及完整的 API 参考。

