feat:implementacion grafica
This commit is contained in:
138
lib/features/auth/presentation/widgets/privacy_notice_card.dart
Normal file
138
lib/features/auth/presentation/widgets/privacy_notice_card.dart
Normal file
@@ -0,0 +1,138 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
|
||||
/// Widget de aviso de privacidad con mensajería preventiva.
|
||||
///
|
||||
/// Comunica de forma elegante las garantías de privacidad del sistema
|
||||
/// y desincentiva comportamientos peligrosos como perseguir el camión.
|
||||
class PrivacyNoticeCard extends StatelessWidget {
|
||||
const PrivacyNoticeCard({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.lightMint,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: AppTheme.mintGreen.withOpacity(0.3),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.shield_outlined,
|
||||
size: 18,
|
||||
color: AppTheme.leafGreen,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Tu seguridad, nuestra prioridad',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppTheme.forestGreen,
|
||||
letterSpacing: 0.2,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_PrivacyPoint(
|
||||
icon: Icons.location_off_outlined,
|
||||
text:
|
||||
'Nunca mostraremos mapas en tiempo real ni la ubicación exacta del camión.',
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
_PrivacyPoint(
|
||||
icon: Icons.directions_run_outlined,
|
||||
text:
|
||||
'No necesitas perseguir al camión — recibirás una alerta con tiempo suficiente.',
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
_PrivacyPoint(
|
||||
icon: Icons.lock_outline,
|
||||
text:
|
||||
'Tu sesión usa cifrado JWT. Nunca compartimos tus datos con terceros.',
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _PrivacyPoint extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String text;
|
||||
|
||||
const _PrivacyPoint({required this.icon, required this.text});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(icon, size: 15, color: AppTheme.mintGreen),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppTheme.forestGreen.withOpacity(0.85),
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Banner de horario preventivo — aparece en la pantalla de login
|
||||
/// para desincentivar sacar basura fuera de horario.
|
||||
class ScheduleWarningBanner extends StatelessWidget {
|
||||
const ScheduleWarningBanner({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.alertAmber.withOpacity(0.10),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(
|
||||
color: AppTheme.alertAmber.withOpacity(0.35),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.wb_twilight_outlined,
|
||||
size: 16,
|
||||
color: AppTheme.alertAmber,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Saca tu basura solo en el horario indicado. '
|
||||
'Hacerlo antes contamina y genera multas.',
|
||||
style: TextStyle(
|
||||
fontSize: 11.5,
|
||||
color: AppTheme.earthBrown,
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user