fix: corregir typo en nombre de color reciclables en theme
This commit is contained in:
@@ -9,7 +9,7 @@ class AppTheme {
|
|||||||
|
|
||||||
// ── Paleta de categorías ─────────────────────────────────────────
|
// ── Paleta de categorías ─────────────────────────────────────────
|
||||||
static const organicosColor = Color(0xFF4CAF50);
|
static const organicosColor = Color(0xFF4CAF50);
|
||||||
static const reciclabesColor = Color(0xFF2196F3);
|
static const reciclabledColor = Color(0xFF2196F3);
|
||||||
static const sanitariosColor = Color(0xFFFF5722);
|
static const sanitariosColor = Color(0xFFFF5722);
|
||||||
static const especialesColor = Color(0xFFFF9800);
|
static const especialesColor = Color(0xFFFF9800);
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ class AppTheme {
|
|||||||
static Color colorDeCategoriaId(String id) {
|
static Color colorDeCategoriaId(String id) {
|
||||||
return switch (id) {
|
return switch (id) {
|
||||||
'organicos' => organicosColor,
|
'organicos' => organicosColor,
|
||||||
'reciclables' => reciclabesColor,
|
'reciclables' => reciclabledColor,
|
||||||
'sanitarios' => sanitariosColor,
|
'sanitarios' => sanitariosColor,
|
||||||
'especiales' => especialesColor,
|
'especiales' => especialesColor,
|
||||||
_ => primaryColor,
|
_ => primaryColor,
|
||||||
|
|||||||
@@ -62,22 +62,18 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final response = await Supabase.instance.client
|
// TODO: Llamar a endpoint /auth/login del backend en lugar de Supabase directo
|
||||||
.from('users')
|
// Por ahora: simulación básica
|
||||||
.select('id, email, phone, password_hash')
|
if (emailCtrl.text.isNotEmpty && passCtrl.text.isNotEmpty) {
|
||||||
.eq('email', emailCtrl.text)
|
|
||||||
.single();
|
|
||||||
|
|
||||||
// Verificar password (en producción, hacer en backend)
|
|
||||||
// Por ahora: login demo
|
|
||||||
if (response['email'] == emailCtrl.text) {
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
Navigator.of(context).pushReplacement(
|
Navigator.of(context).pushReplacement(
|
||||||
MaterialPageRoute(builder: (_) => const HomePage()),
|
MaterialPageRoute(builder: (_) => const HomePage()),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
setState(() => error = 'Email y password requeridos');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setState(() => error = 'Email o contraseña incorrectos');
|
setState(() => error = 'Error: $e');
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => loading = false);
|
setState(() => loading = false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user