mejora de mensajes para usuario
This commit is contained in:
@@ -103,47 +103,59 @@ class _ProfessionScreenState extends State<ProfessionScreen> {
|
||||
var professions = filteredProfessions!;
|
||||
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
label: 'Seleccione su profesión',
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, top: 10),
|
||||
child: TextField(
|
||||
controller: searchController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Buscar su profesión',
|
||||
prefixIcon: Icon(Icons.assignment_ind_rounded),
|
||||
child: Scaffold(
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
label: 'Seleccione su profesión',
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: const Text(
|
||||
'Si no ves tu profesión, ¡contáctanos en la sección de soporte y la agregaremos para ti!',
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: Colors.blue,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: professions.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
professions[index],
|
||||
style: const TextStyle(
|
||||
fontSize: 18.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
updateProfession(professions[index]);
|
||||
Navigator.pop(context, professions[index]);
|
||||
},
|
||||
);
|
||||
},
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, top: 0),
|
||||
child: TextField(
|
||||
controller: searchController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Buscar su profesión',
|
||||
prefixIcon: Icon(Icons.assignment_ind_rounded),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: professions.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ListTile(
|
||||
title: Text(
|
||||
professions[index],
|
||||
style: const TextStyle(
|
||||
fontSize: 18.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
updateProfession(professions[index]);
|
||||
Navigator.pop(context, professions[index]);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -69,14 +69,9 @@ class _ProfessionalRevisionScreenState
|
||||
width: 350,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
size: 20,
|
||||
),
|
||||
SizedBox(width: 15),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Su información, esta en revisión, una vez aprobada podrá acceder, al perfil profesional.',
|
||||
'Gracias por proporcionar su información. Actualmente, estamos revisando sus datos y una vez aprobados, podrá acceder al perfil profesional sin problemas. Le notificaremos tan pronto como su cuenta esté lista. ¡Gracias por su paciencia!.',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
|
||||
@@ -8,37 +8,66 @@ class RequestSentScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
Navigator.pushReplacementNamed(context, '/servicio');
|
||||
},
|
||||
label: 'Solicitud enviada',
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 90, bottom: 40),
|
||||
child: Icon(
|
||||
Icons.check_circle_outline,
|
||||
size: 50,
|
||||
color: Color(0xFF35A8ED),
|
||||
),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(bottom: 350),
|
||||
child: Text('Información enviada con éxito.',
|
||||
style:
|
||||
TextStyle(color: Color(0xFF2BA4EC), fontSize: 20)),
|
||||
),
|
||||
PrimaryButtom(
|
||||
onPressed: () {
|
||||
Navigator.pushReplacementNamed(context, '/servicio');
|
||||
},
|
||||
label: 'Inicio'),
|
||||
],
|
||||
child: Scaffold(
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
Navigator.pushReplacementNamed(context, '/servicio');
|
||||
},
|
||||
label: 'Solicitud enviada',
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 90, bottom: 40),
|
||||
child: Icon(
|
||||
Icons.check_circle_outline,
|
||||
size: 50,
|
||||
color: Color(0xFF35A8ED),
|
||||
),
|
||||
),
|
||||
)));
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(bottom: 0),
|
||||
child: Text('Información enviada con éxito.',
|
||||
style: TextStyle(color: Color(0xFF2BA4EC), fontSize: 20)),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(
|
||||
left: 40, right: 40, top: 50, bottom: 180),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFD6F4FF),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 5,
|
||||
offset: const Offset(1, 3),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"¡Gracias por proporcionar tu información! Revisaremos los datos proporcionados y, una vez confirmados, podrás convertirte en un profesional registrado en nuestra aplicación. ¡Esperamos contar contigo pronto!",
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
PrimaryButtom(
|
||||
onPressed: () {
|
||||
Navigator.pushReplacementNamed(context, '/servicio');
|
||||
},
|
||||
label: 'Inicio'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user