Cambio de icono y traducciones

This commit is contained in:
2026-05-11 18:05:13 +02:00
parent 4bf8a01a20
commit 112a8a6142
58 changed files with 996 additions and 147 deletions

View File

@@ -14,82 +14,54 @@ class PantallaReglas extends StatelessWidget {
appBar: AppBar(title: Text(l10n.rulesTitle)),
body: FondoFarolero(
intenso: true,
child: SingleChildScrollView(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_seccion(
context,
1,
Icons.person_search,
l10n.rulesWhatIsTitle,
l10n.rulesWhatIsBody,
child: SafeArea(
top: false,
child: SingleChildScrollView(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 28),
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 620),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
EncabezadoFarolero(
icono: Icons.menu_book_rounded,
titulo: l10n.rulesTitle,
subtitulo: l10n.rulesWhatIsBody,
),
const SizedBox(height: 16),
_seccion(context, 1, Icons.person_search, l10n.rulesWhatIsTitle, l10n.rulesWhatIsBody),
_seccion(context, 2, Icons.chat_bubble, l10n.rulesHowToPlayTitle, l10n.rulesHowToPlayBody),
_seccion(context, 3, Icons.how_to_vote, l10n.rulesWhoWinsTitle, l10n.rulesWhoWinsBody),
_seccion(context, 4, Icons.lightbulb, l10n.rulesTipsPlayersTitle, l10n.rulesTipsPlayersBody),
_seccion(context, 5, Icons.theater_comedy, l10n.rulesTipsImpostorTitle, l10n.rulesTipsImpostorBody),
_seccion(context, 6, Icons.devices, l10n.rulesModesTitle, l10n.rulesModesBody),
_ejemplo(context, l10n.rulesExampleTitle, l10n.rulesExampleBody),
],
),
),
),
_seccion(
context,
2,
Icons.chat_bubble,
l10n.rulesHowToPlayTitle,
l10n.rulesHowToPlayBody,
),
_seccion(
context,
3,
Icons.how_to_vote,
l10n.rulesWhoWinsTitle,
l10n.rulesWhoWinsBody,
),
_seccion(
context,
4,
Icons.lightbulb,
l10n.rulesTipsPlayersTitle,
l10n.rulesTipsPlayersBody,
),
_seccion(
context,
5,
Icons.theater_comedy,
l10n.rulesTipsImpostorTitle,
l10n.rulesTipsImpostorBody,
),
_seccion(
context,
6,
Icons.devices,
l10n.rulesModesTitle,
l10n.rulesModesBody,
),
_ejemplo(context, l10n.rulesExampleTitle, l10n.rulesExampleBody),
const SizedBox(height: 32),
],
),
),
),
);
}
Widget _seccion(
BuildContext context,
int numero,
IconData icono,
String titulo,
String contenido,
) {
Widget _seccion(BuildContext context, int numero, IconData icono, String titulo, String contenido) {
return Padding(
padding: const EdgeInsets.only(bottom: 16),
padding: const EdgeInsets.only(bottom: 14),
child: PanelFarolero(
padding: const EdgeInsets.all(12),
padding: const EdgeInsets.fromLTRB(14, 14, 14, 16),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 54,
height: 54,
alignment: Alignment.center,
decoration: BoxDecoration(
color: TemaApp.colorNaranja.withValues(alpha: 0.16),
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: TemaApp.colorNaranja),
),
child: Icon(icono, color: TemaApp.colorNaranja, size: 30),
@@ -97,23 +69,25 @@ class PantallaReglas extends StatelessWidget {
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'$numero. ${titulo.toUpperCase()}',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.titleLarge,
),
const SizedBox(height: 8),
Text(contenido,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
height: 1.5,
)),
],
const SizedBox(height: 8),
Text(
contenido,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(height: 1.45),
),
],
),
),
],
),
),
),
);
}
@@ -123,19 +97,20 @@ class PantallaReglas extends StatelessWidget {
child: PanelFarolero(
color: TemaApp.colorNaranja.withValues(alpha: 0.15),
borderColor: TemaApp.colorNaranja,
padding: const EdgeInsets.fromLTRB(18, 18, 18, 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(titulo,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: TemaApp.colorNaranja,
)),
const SizedBox(height: 8),
Text(contenido,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
height: 1.5,
)),
],
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
titulo,
style: Theme.of(context).textTheme.titleLarge?.copyWith(color: TemaApp.colorNaranja),
),
const SizedBox(height: 8),
Text(
contenido,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(height: 1.45),
),
],
),
),
);