mejora de mensajes para usuario
This commit is contained in:
@@ -373,6 +373,25 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
void _showCustomSnackBar(BuildContext context, String message) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Container(
|
||||
height: 50,
|
||||
child: Center(
|
||||
child: Text(
|
||||
message,
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
),
|
||||
duration: Duration(seconds: 3),
|
||||
backgroundColor: Colors.red, // Personaliza el color de fondo
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> sendInfo() async {
|
||||
final String cedula = _cedulaController.text.trim();
|
||||
final String especializacion = _especializacionController.text.trim();
|
||||
@@ -380,17 +399,19 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
especializacion.split(',').map((e) => e.trim()).toList();
|
||||
|
||||
if (cedula.isEmpty) {
|
||||
showSnackBar('Ingrese una cedula válida');
|
||||
_showCustomSnackBar(context, 'Por favor, ingrese el número de cédula.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (image_cedula == null) {
|
||||
showSnackBar('Ingrese la imagen de la cedula');
|
||||
_showCustomSnackBar(
|
||||
context, 'Por favor, adjunte el documento PDF de su cédula.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (image_certificado == null) {
|
||||
showSnackBar('Ingrese la imagen de su certificado');
|
||||
_showCustomSnackBar(context,
|
||||
'Por favor, adjunte el documento PDF de su certificado. ¡Gracias por su colaboración!');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -730,7 +751,7 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
SizedBox(width: 15),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Para añadir mas de una especialidad, envie mas fotos y separe por comas (,).',
|
||||
'¡Importante! Solo aceptamos archivos en formato PDF. Si desea agregar más de una especialidad, envíe archivos adicionales separados por comas (,). ¡Gracias!',
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user