mejora de mensajes para usuario
This commit is contained in:
@@ -103,47 +103,59 @@ class _ProfessionScreenState extends State<ProfessionScreen> {
|
|||||||
var professions = filteredProfessions!;
|
var professions = filteredProfessions!;
|
||||||
|
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: PopAppbar(
|
appBar: PopAppbar(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
label: 'Seleccione su profesión',
|
label: 'Seleccione su profesión',
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Container(
|
||||||
padding: const EdgeInsets.only(left: 10, right: 10, top: 10),
|
padding: const EdgeInsets.all(10),
|
||||||
child: TextField(
|
child: const Text(
|
||||||
controller: searchController,
|
'Si no ves tu profesión, ¡contáctanos en la sección de soporte y la agregaremos para ti!',
|
||||||
decoration: const InputDecoration(
|
style: TextStyle(
|
||||||
hintText: 'Buscar su profesión',
|
fontSize: 16.0,
|
||||||
prefixIcon: Icon(Icons.assignment_ind_rounded),
|
color: Colors.blue,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Expanded(
|
padding: const EdgeInsets.only(left: 10, right: 10, top: 0),
|
||||||
child: ListView.builder(
|
child: TextField(
|
||||||
itemCount: professions.length,
|
controller: searchController,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
decoration: const InputDecoration(
|
||||||
return ListTile(
|
hintText: 'Buscar su profesión',
|
||||||
title: Text(
|
prefixIcon: Icon(Icons.assignment_ind_rounded),
|
||||||
professions[index],
|
),
|
||||||
style: const TextStyle(
|
),
|
||||||
fontSize: 18.0,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onTap: () {
|
|
||||||
updateProfession(professions[index]);
|
|
||||||
Navigator.pop(context, professions[index]);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
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 {
|
Future<void> sendInfo() async {
|
||||||
final String cedula = _cedulaController.text.trim();
|
final String cedula = _cedulaController.text.trim();
|
||||||
final String especializacion = _especializacionController.text.trim();
|
final String especializacion = _especializacionController.text.trim();
|
||||||
@@ -380,17 +399,19 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
|||||||
especializacion.split(',').map((e) => e.trim()).toList();
|
especializacion.split(',').map((e) => e.trim()).toList();
|
||||||
|
|
||||||
if (cedula.isEmpty) {
|
if (cedula.isEmpty) {
|
||||||
showSnackBar('Ingrese una cedula válida');
|
_showCustomSnackBar(context, 'Por favor, ingrese el número de cédula.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image_cedula == null) {
|
if (image_cedula == null) {
|
||||||
showSnackBar('Ingrese la imagen de la cedula');
|
_showCustomSnackBar(
|
||||||
|
context, 'Por favor, adjunte el documento PDF de su cédula.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image_certificado == null) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -730,7 +751,7 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
|||||||
SizedBox(width: 15),
|
SizedBox(width: 15),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
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),
|
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -69,14 +69,9 @@ class _ProfessionalRevisionScreenState
|
|||||||
width: 350,
|
width: 350,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
|
||||||
Icons.info_outline,
|
|
||||||
size: 20,
|
|
||||||
),
|
|
||||||
SizedBox(width: 15),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
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(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -8,37 +8,66 @@ class RequestSentScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: PopAppbar(
|
appBar: PopAppbar(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pushReplacementNamed(context, '/servicio');
|
Navigator.pushReplacementNamed(context, '/servicio');
|
||||||
},
|
},
|
||||||
label: 'Solicitud enviada',
|
label: 'Solicitud enviada',
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.only(top: 90, bottom: 40),
|
padding: EdgeInsets.only(top: 90, bottom: 40),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.check_circle_outline,
|
Icons.check_circle_outline,
|
||||||
size: 50,
|
size: 50,
|
||||||
color: Color(0xFF35A8ED),
|
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'),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
)));
|
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