empresas y negocios selector integrado

This commit is contained in:
Abraham
2025-07-16 15:48:39 -07:00
parent 9488188de5
commit 8670f90068
13 changed files with 2884 additions and 48 deletions

View File

@@ -120,6 +120,8 @@ class EmpresasNegociosProvider extends ChangeNotifier {
'empresa_id': PlutoCell(value: negocio.empresaId),
'nombre': PlutoCell(value: negocio.nombre),
'direccion': PlutoCell(value: negocio.direccion),
'direccion_completa': PlutoCell(
value: negocio.direccion), // Nuevo campo para la segunda columna
'latitud': PlutoCell(value: negocio.latitud.toString()),
'longitud': PlutoCell(value: negocio.longitud.toString()),
'tipo_local': PlutoCell(value: negocio.tipoLocal),
@@ -340,8 +342,15 @@ class EmpresasNegociosProvider extends ChangeNotifier {
return Container(
height: height,
width: width,
color: Colors.grey[300],
child: const Icon(Icons.image_not_supported),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
),
child: Image.asset(
'assets/images/placeholder_no_image.jpg',
height: height,
width: width,
fit: BoxFit.cover,
),
);
} else if (image is Uint8List) {
return Image.memory(
@@ -349,6 +358,14 @@ class EmpresasNegociosProvider extends ChangeNotifier {
height: height,
width: width,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Image.asset(
'assets/images/placeholder_no_image.jpg',
height: height,
width: width,
fit: BoxFit.cover,
);
},
);
} else if (image is String) {
return Image.network(
@@ -357,15 +374,20 @@ class EmpresasNegociosProvider extends ChangeNotifier {
width: width,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Container(
return Image.asset(
'assets/images/placeholder_no_image.jpg',
height: height,
width: width,
color: Colors.grey[300],
child: const Icon(Icons.broken_image),
fit: BoxFit.cover,
);
},
);
}
return null;
return Image.asset(
'assets/images/placeholder_no_image.jpg',
height: height,
width: width,
fit: BoxFit.cover,
);
}
}