mirror of
https://github.com/Iconica-Development/flutter_registration.git
synced 2025-05-18 21:23:43 +02:00
feat: expose input decoration in authtextfield
This commit is contained in:
parent
d1ad003c22
commit
f1663afa1b
1 changed files with 8 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue