fix: require city and phone (not just name) before switching to pro mode

Aligns the profile-completeness gate in the sidebar with the mobile app,
and reports which specific field is missing instead of a generic message.
This commit is contained in:
Lizandro Guarnizo
2026-08-03 22:16:21 -05:00
parent aa7b890ce4
commit 459d6f7203
+14 -3
View File
@@ -179,9 +179,20 @@ class Sidebar extends StatelessWidget {
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
if (authProvider.user?.name == null ||
authProvider.user?.name == '') {
NotificationsService.showSnackBarError('Primero completa tu perfil');
final missing = <String>[
if (authProvider.user?.name == null ||
authProvider.user?.name == '')
'nombre',
if (authProvider.user?.city == null ||
authProvider.user?.city == '')
'ciudad',
if (authProvider.user?.phone == null ||
authProvider.user?.phone == '')
'teléfono',
];
if (missing.isNotEmpty) {
NotificationsService.showSnackBarError(
'Completa tu perfil: falta ${missing.join(', ')}');
navigateTo(Flurorouter.profileRoute);
return;
}