mirror of
https://github.com/Iconica-Development/flutter_input_library.git
synced 2025-05-18 17:03:45 +02:00
feat: Add controller to password
This commit is contained in:
parent
7024fb7e40
commit
3b2c5e294f
3 changed files with 7 additions and 1 deletions
|
@ -66,3 +66,6 @@
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
* Updated the FlutterFormInputSwitch to FlutterFormInputBool. This now includes a parameter to either show a checkbox or switch
|
* 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`
|
||||||
|
|
|
@ -22,6 +22,7 @@ class FlutterFormInputPassword extends StatefulWidget {
|
||||||
this.onFieldSubmitted,
|
this.onFieldSubmitted,
|
||||||
this.enabled = true,
|
this.enabled = true,
|
||||||
this.decoration,
|
this.decoration,
|
||||||
|
this.controller,
|
||||||
});
|
});
|
||||||
final Widget? label;
|
final Widget? label;
|
||||||
final FocusNode? focusNode;
|
final FocusNode? focusNode;
|
||||||
|
@ -34,6 +35,7 @@ class FlutterFormInputPassword extends StatefulWidget {
|
||||||
final Function(String?)? onFieldSubmitted;
|
final Function(String?)? onFieldSubmitted;
|
||||||
final bool enabled;
|
final bool enabled;
|
||||||
final InputDecoration? decoration;
|
final InputDecoration? decoration;
|
||||||
|
final TextEditingController? controller;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<FlutterFormInputPassword> createState() => _PasswordTextFieldState();
|
State<FlutterFormInputPassword> createState() => _PasswordTextFieldState();
|
||||||
|
@ -57,6 +59,7 @@ class _PasswordTextFieldState extends State<FlutterFormInputPassword> {
|
||||||
InputDecoration(suffixIcon: suffixIcon);
|
InputDecoration(suffixIcon: suffixIcon);
|
||||||
|
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
|
controller: widget.controller,
|
||||||
style: widget.style,
|
style: widget.style,
|
||||||
initialValue: widget.initialValue,
|
initialValue: widget.initialValue,
|
||||||
inputFormatters: widget.inputFormatters,
|
inputFormatters: widget.inputFormatters,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: flutter_input_library
|
name: flutter_input_library
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 3.0.0
|
version: 3.1.0
|
||||||
repository: https://github.com/Iconica-Development/flutter_input_library
|
repository: https://github.com/Iconica-Development/flutter_input_library
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue