feat: Add controller to password

This commit is contained in:
Jacques 2024-02-07 16:13:35 +01:00
parent 7024fb7e40
commit 3b2c5e294f
3 changed files with 7 additions and 1 deletions

View file

@ -66,3 +66,6 @@
## 3.0.0
* Updated the FlutterFormInputSwitch to FlutterFormInputBool. This now includes a parameter to either show a checkbox or switch
## 3.1.0
* `FlutterFormInputPassword` now has the controller parameter to set the `TextEditingController` of the `TextFormField`

View file

@ -22,6 +22,7 @@ class FlutterFormInputPassword extends StatefulWidget {
this.onFieldSubmitted,
this.enabled = true,
this.decoration,
this.controller,
});
final Widget? label;
final FocusNode? focusNode;
@ -34,6 +35,7 @@ class FlutterFormInputPassword extends StatefulWidget {
final Function(String?)? onFieldSubmitted;
final bool enabled;
final InputDecoration? decoration;
final TextEditingController? controller;
@override
State<FlutterFormInputPassword> createState() => _PasswordTextFieldState();
@ -57,6 +59,7 @@ class _PasswordTextFieldState extends State<FlutterFormInputPassword> {
InputDecoration(suffixIcon: suffixIcon);
return TextFormField(
controller: widget.controller,
style: widget.style,
initialValue: widget.initialValue,
inputFormatters: widget.inputFormatters,

View file

@ -1,6 +1,6 @@
name: flutter_input_library
description: A new Flutter package project.
version: 3.0.0
version: 3.1.0
repository: https://github.com/Iconica-Development/flutter_input_library
environment: