Skip to content

Commit 3d8b83d

Browse files
committed
fix: adds initialValue to password text field
1 parent 7e6985b commit 3d8b83d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.2
4+
5+
- 📖  Changed: Adds `initialValue` behavior to `PasswordTextField` so you can use controlled and uncontrolled fields.
6+
37
## 1.0.1
48

59
- 📖  Changed: Adds `translucent` behavior to `HideKeyboardOnTouchOutside` so tap events are propagated properly.

lib/material/password_textfield.dart

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
33
class PasswordTextField extends StatefulWidget {
44
final Key? key;
55
final TextEditingController? controller;
6+
final String? initialValue;
67
final InputDecoration? decoration;
78
final String? Function(String?)? validator;
89
final bool? enabled;
@@ -18,6 +19,7 @@ class PasswordTextField extends StatefulWidget {
1819
this.autovalidateMode,
1920
this.autocorrect = true,
2021
this.decoration,
22+
this.initialValue,
2123
this.onChanged,
2224
});
2325

@@ -51,6 +53,7 @@ class _PasswordTextFieldState extends State<PasswordTextField> {
5153
autocorrect: widget.autocorrect,
5254
enabled: widget.enabled,
5355
decoration: _buildDecoration(),
56+
initialValue: widget.initialValue,
5457
onChanged: widget.onChanged,
5558
);
5659
}

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: widgetkit
22
description:
33
A kit of widgets that are (almost) always needed in the different apps.
4-
version: 1.0.1
4+
version: 1.0.2
55
homepage: https://github.com/CodingAleCR/widgetkit
66

77
environment:

0 commit comments

Comments
 (0)