密碼欄位
一個用於最常需要的密碼文字欄小部件的 Flutter 套件。它具有密碼文字欄所需的大多數功能
- 星標
- 14
- 分支
- 5
- 最近推送(UTC)
- 2023年10月19日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
passwordfield: ^0.2.0
A simple and easy to use flutter package to add a passwordfield to your Flutter project.
Getting Started
Installation
- Add the dependency
flutter pub add passwordfield
- Import the package
import 'package:passwordfield/passwordfield.dart';
- Voila! use the Widget
PasswordField();
Now Supports adding constraints on the Password

| Example 1 | Output |
|---|---|
|
|
| Example 2 | Output |
|---|---|
|
|
More examples here 👈
Properties
bool autoFocus: if autofocus is true keyboard pops up as soon as the widget is rendered on screen defaults to false
Color backgroundColor Background Color for the textfield (defaults to white), By default the backgroundColor is based on the current [Theme].
PasswordBorder border: Border class for the passwordfield which provides borders for different states of the passwordfield e.g [enabledBorder],[border], [focusedBorder], [focusedErrorBorder]
TextEditingController controller: A controller for an editable passwordfield.
int errorMaxLines: Defaults to null, which means that the [errorText] will be limited to a single line with [TextOverflow.ellipsis]
String errorMessage: custom message to show if the input password does not match the pattern.
String floatingText: floatingText to show when floatingPlaceholder is true
hasFloatingPlaceholder: whether the placeholder can float to left top on focus, defaults to false
final String hintText: default text to show on the passwordfield when it is empty
PasswordDecoration passwordDecoration: Decoration class for the PasswordField to customize the input styling
int maxLength: the max number of characters the password field can support
Function onSubmit: function triggerred when the submit button on keyboard is pressed
Function onChanged: function triggerred when the password is changed in the passwordfield
String passwordConstraint: supports adding constraints to the Passwordfield by adding a regex pattern
You are welcome to contribute to this package, to contribute please read the contributing guidelines.
分類
使用的依賴
依賴清單 3 項
- flutter
{"sdk":"flutter"} - flutter_test開發依賴
{"sdk":"flutter"} - lints開發依賴
^2.0.1
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗

