Skip to content

Commit 5e9b0eb

Browse files
committed
💄 Se mejoro el registro del alumno, con el uso del correo
1 parent f1a5425 commit 5e9b0eb

2 files changed

Lines changed: 182 additions & 176 deletions

File tree

lib/core/widgets/text_input_field.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class TextInputField extends StatelessWidget {
1414
// NUEVO: Propiedad para el icono del final (ojito)
1515
final Widget? suffixIcon;
1616

17+
final String? Function(String?)? validator;
18+
1719
const TextInputField({
1820
super.key,
1921
required this.label,
@@ -26,6 +28,7 @@ class TextInputField extends StatelessWidget {
2628
this.onFieldSubmitted,
2729
this.readOnly = false,
2830
this.suffixIcon, // Lo recibimos en el constructor
31+
this.validator, // Lo recibimos aquí
2932
});
3033

3134
@override
@@ -56,6 +59,7 @@ class TextInputField extends StatelessWidget {
5659
focusNode: focusNode,
5760
onFieldSubmitted: onFieldSubmitted,
5861
readOnly: readOnly,
62+
validator: validator,
5963
decoration: InputDecoration(
6064
labelText: label,
6165
labelStyle: TextStyle(color: Colors.grey[600]),

0 commit comments

Comments
 (0)