Files
prosappco/lib/screens/professional/professional_denied_screen.dart
T
Lizandro GuarnizoandClaude Sonnet 4.6 1e962af6e8 feat: redesign professional pending and denied screens
- professional_denied_screen: full UI with icon, bullet list of next steps,
  re-register button and logout option (was just a Text widget)
- professional_pending_screen: replace static GIF screen with step-by-step
  progress indicator (submitted → in review → approved), notification tip,
  logout button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 16:06:35 -05:00

122 lines
5.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:prosappco/blocs/authentication_bloc/authentication_bloc.dart';
class ProfessionalDeniedScreen extends StatelessWidget {
const ProfessionalDeniedScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 40),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 88,
height: 88,
decoration: BoxDecoration(
color: const Color(0xFFFFEBEE),
shape: BoxShape.circle,
),
child: const Icon(Icons.cancel_outlined, color: Color(0xFFE53935), size: 48),
),
const SizedBox(height: 24),
const Text(
'Solicitud rechazada',
style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold, color: Color(0xFF1A1A2E)),
textAlign: TextAlign.center,
),
const SizedBox(height: 12),
const Text(
'Tu solicitud para convertirte en profesional no fue aprobada. Esto puede deberse a información incompleta o documentación no válida.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.grey, height: 1.5),
),
const SizedBox(height: 32),
Container(
width: double.infinity,
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: const Color(0xFFFFF3E0),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xFFFFCC02).withOpacity(0.4)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Row(
children: [
Icon(Icons.info_outline, color: Color(0xFFF57C00), size: 20),
SizedBox(width: 8),
Text('¿Qué puedo hacer?', style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFF57C00))),
],
),
SizedBox(height: 12),
_BulletPoint(text: 'Verifica que todos tus datos sean correctos'),
_BulletPoint(text: 'Asegúrate de haber adjuntado los documentos requeridos'),
_BulletPoint(text: 'Vuelve a registrarte como profesional con la información actualizada'),
_BulletPoint(text: 'Contacta a soporte si crees que fue un error'),
],
),
),
const SizedBox(height: 32),
SizedBox(
width: double.infinity,
child: ElevatedButton.icon(
onPressed: () => Navigator.of(context).pop(),
icon: const Icon(Icons.refresh),
label: const Text('Volver a registrarme'),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF42A4EF),
foregroundColor: Colors.white,
padding: const EdgeInsets.symmetric(vertical: 16),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
elevation: 0,
),
),
),
const SizedBox(height: 12),
SizedBox(
width: double.infinity,
child: OutlinedButton.icon(
onPressed: () => context.read<AuthenticationBloc>().add(AuthenticationLogoutRequested()),
icon: const Icon(Icons.logout),
label: const Text('Cerrar sesión'),
style: OutlinedButton.styleFrom(
foregroundColor: Colors.grey,
padding: const EdgeInsets.symmetric(vertical: 14),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
side: const BorderSide(color: Colors.grey),
),
),
),
],
),
),
),
);
}
}
class _BulletPoint extends StatelessWidget {
final String text;
const _BulletPoint({required this.text});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('• ', style: TextStyle(color: Color(0xFFF57C00), fontWeight: FontWeight.bold)),
Expanded(child: Text(text, style: const TextStyle(fontSize: 13, color: Color(0xFF5D4037)))),
],
),
);
}
}