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