feat: expose input decoration in authtextfield

This commit is contained in:
FahadFahim71 2024-02-02 11:19:21 +01:00
parent d1ad003c22
commit f1663afa1b

View file

@ -19,6 +19,7 @@ class AuthTextField extends AuthField {
this.onChange,
this.hidden,
this.onPassChanged,
this.textFieldDecoration,
}) {
textController =
textEditingController ?? TextEditingController(text: value);
@ -32,6 +33,7 @@ class AuthTextField extends AuthField {
final Function(String value)? onChange;
final bool? hidden;
final Function(bool value)? onPassChanged;
final InputDecoration? textFieldDecoration;
@override
Widget build() {
@ -57,11 +59,12 @@ class AuthTextField extends AuthField {
return TextFormField(
style: textStyle,
decoration: InputDecoration(
label: label,
hintText: hintText,
suffix: suffix,
),
decoration: textFieldDecoration ??
InputDecoration(
label: label,
hintText: hintText,
suffix: suffix,
),
controller: textController,
obscureText: hidden ?? obscureText,
onChanged: (v) {