Flutter용으로 실시간 비밀번호 강도 평가 및 규칙 검증을 제공하는 매우 사용자 정의 가능한 비밀번호 입력 위젯입니다. 길이, 특수 문자, 대문자 등 비밀번호 복잡성에 대한 시각적 피드백을 통해 사용자 경험을 향상시킵니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 보안 인증이 필요한 크로스플랫폼 애플리케이션에 적합합니다. 개발자는 앱 디자인 요구 사항에 맞춰 외관과 동작을 맞춤 설정할 수 있습니다.
사용 사례
보안 로그인 양식
사용자 등록 프로세스
실시간 피드백을 제공하는 비밀번호 생성
다중 플랫폼 인증 인터페이스
시각적 표시를 사용한 폼 검증
주요 기능
실시간 비밀번호 강도 분석
사용자 정의 가능한 검증 규칙
사용자 정의 가능한 UI 및 스타일링
크로스 플랫폼 호환성
비밀번호 기준에 대한 인터랙티브 피드백
국제화 지원
적합한 대상
안전한 인증 시스템을 구축하는 개발자
강력한 암호 정책을 요구하는 앱
유연한 폼 컴포넌트를 원하는 디자이너
여러 운영 체제를 대상으로 하는 프로젝트
사용자 친화적인 비밀번호 입력을 우선시하는 팀
고려 사항
검증 규칙의 신중한 구성이 필요합니다
영어가 아닌 사용자를 위해 추가적인 현지화가 필요할 수 있습니다
대규모 양식에서 과도하게 사용할 경우 성능에 미치는 영향
비밀번호 전용 사용 사례에만 제한되며 일반 텍스트 입력에는 적합하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Introduction
FancyPasswordField is a widget that acts as a password validation field. You can have all the features of a commom password field, and also gets cool features like setting validation rules and password strength.
Requirements
Starting with 3.0.0 this package is built on top of material_ui, the Material Design library that has been decoupled from the Flutter framework. It requires Flutter 3.44.0 or newer and Dart 3.12.0 or newer.
Because material_ui ships its own copies of the Material widgets, InputDecoration from package:material_ui/material_ui.dart is a different type from the one in package:flutter/material.dart. Your app has to import Material from the same place this package does:
import'package:fancy_password_field/fancy_password_field.dart';
import'package:material_ui/material_ui.dart'; // instead of package:flutter/material.dart
If you are not ready to move your app off package:flutter/material.dart, stay on fancy_password_field: ^2.0.8.
Basic Usage
The most simple usage is just using FancyPasswordField withou any properties.
This will create a password field with some default configurations. The default behavior is to show the strength indicator
above the form field. You can disabled this behavior passing false to the hasStrengthIndicator property.
We can go a bit further and pass some validations rules to our widget.
These package comes if some pre defined commom rules so you can just use out of the box. Feel free to implement your own [ValidationRule] and adds normaly to the password field.
Custom Rules
As described earlier, the package comes with built in commom used rules, but you can create your own custom rules. To do this, just extends the base [ValidationRule] abstract class. You'll have to provide a name and a validation function for your rule.
Just doing that is already enough for your rule just work. Pass your rule to the [validationRules] set of the [FancyPasswordField] and the showing and validation of the rules will occur.
Password Controller
The [FancyPasswordField] has a controller that you can pass. The purpose of this controller is almost the same as any controller on the Flutter world. The controller gives you access to underline info of the field. Notably, it gives you information about the rules and what rules are beeing ofended at any point. The controller has also one getter that indicates whether all rules are ok or not.
One use case of this is if you want to validate the status of the form field to enable or disable the saving of a form.
The [FancyPasswordField] comes with some pre defined widget that show some okish good looking components for the strenght indicator
and for the rules. But the widget was designed to be fully customizable. So you can pass your own builers to both the
strength password widget and the rules widget.
On the Samples section you can grab a lot of customizations samples.
Above we can see an example of some possible customization for these fields.