v2.0.1passcode_screen
네이티브 iOS와 유사한 패스코드 입력 화면을 표시하는 플랫폼 독립적인 Flutter 패키지입니다. 색상, 크기, 폰트 등을 사용하여 화면을 사용자 정의할 수 있습니다.
Flutter - 비밀번호 잠금 화면
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.2아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A Flutter package for iOS and Android for showing passcode input screen, similar to Native iOS.
passcode-screen-demo.gifFirst add passcode_screen as a dependency in your pubspec.yaml file.
Then use import
import 'package:passcode_screen/passcode_screen.dart';
PasscodeScreen(
title: title,
passwordEnteredCallback: _onPasscodeEntered,
cancelButton: Text('Cancel'),
deleteButton: Text('Delete'),
shouldTriggerVerification: _verificationNotifier.stream,
);
_onPasscodeEntered(String enteredPasscode) {
}
final StreamController<bool> _verificationNotifier = StreamController<bool>.broadcast();
_onPasscodeEntered(String enteredPasscode) {
bool isValid = '123456' == enteredPassword;
_verificationNotifier.add(isValid);
}
Don't forget to close a stream
@override
void dispose() {
_verificationNotifier.close();
super.dispose();
}
Customize circles
class CircleUIConfig {
final Color borderColor;
final Color fillColor;
final double borderWidth;
final double circleSize;
double extraSize;
}
Customize keyboard
class KeyboardUIConfig {
final double digitSize;
final TextStyle digitTextStyle;
final TextStyle deleteButtonTextStyle;
final Color primaryColor;
final Color digitFillColor;
final EdgeInsetsGeometry keyboardRowMargin;
final EdgeInsetsGeometry deleteButtonMargin;
}
passcode-screen-custom.png
Plugin is totally platform agnostic. No configuration required - the plugin should work out of the box.
Warmly welcome to submit a pull request!
Passcode Lock Screen is owned and maintained by Redeyes Dev
Vladimir Hudnitsky BeDaut mix1009 pixnbit ssanderson imejiasoft
Basic implementation of a widget.
isValidCallback to help you handle success scenario. isValidCallback will be invoked after passcode screen will pop.cancelCallback to react when user cancelled widget (by @mix1009)