File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
22
33class PasswordTextField extends StatefulWidget {
4+ final Key key;
45 final TextEditingController controller;
56 final InputDecoration decoration;
67 final Function (String ) validator;
78 final bool enabled;
89 final AutovalidateMode autovalidateMode;
910 final bool autocorrect;
11+ final void Function (String ) onChanged;
1012
1113 PasswordTextField ({
14+ this .key,
1215 this .controller,
1316 this .enabled,
1417 this .validator,
1518 this .autovalidateMode,
1619 this .autocorrect = true ,
1720 this .decoration,
21+ this .onChanged,
1822 });
1923
2024 @override
@@ -39,13 +43,15 @@ class _PasswordTextFieldState extends State<PasswordTextField> {
3943 @override
4044 Widget build (BuildContext context) {
4145 return TextFormField (
46+ key: widget.key,
4247 controller: widget.controller,
4348 obscureText: _passwordHidden,
4449 validator: widget.validator,
4550 autovalidateMode: widget.autovalidateMode,
4651 autocorrect: widget.autocorrect,
4752 enabled: widget.enabled,
4853 decoration: _buildDecoration (),
54+ onChanged: widget.onChanged,
4955 );
5056 }
5157
You can’t perform that action at this time.
0 commit comments