Renombrado de 'El Impostor' a 'Farolero'. Package: es.freetimelab.farolero 18 idiomas: es, en, fr, pt, de, it, ru, ja, ko, zh, zh_TW, ar, hi, tr, pl, nl, ca, eu Bancos de palabras: es (1000), en (1000), fr (1000) Pantalla de ajustes con selector de idioma 13138 líneas Dart, 0 issues
152 lines
5.0 KiB
Dart
152 lines
5.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:farolero/l10n/generated/app_localizations.dart';
|
|
import '../tema/tema_app.dart';
|
|
import 'pantalla_ajustes.dart';
|
|
import 'pantalla_crear_partida.dart';
|
|
import 'pantalla_reglas.dart';
|
|
import 'pantalla_unirse.dart';
|
|
|
|
class PantallaPrincipal extends StatelessWidget {
|
|
const PantallaPrincipal({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final l10n = AppLocalizations.of(context)!;
|
|
|
|
return Scaffold(
|
|
body: SafeArea(
|
|
child: Center(
|
|
child: SingleChildScrollView(
|
|
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 24),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
// Logo
|
|
Container(
|
|
width: 120,
|
|
height: 120,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
gradient: const LinearGradient(
|
|
colors: [TemaApp.colorAcento, TemaApp.colorNaranja],
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: TemaApp.colorAcento.withValues(alpha: 0.4),
|
|
blurRadius: 30,
|
|
spreadRadius: 5,
|
|
),
|
|
],
|
|
),
|
|
child: const Center(
|
|
child: Text(
|
|
'🎭',
|
|
style: TextStyle(fontSize: 56),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 24),
|
|
|
|
// Título
|
|
Text(
|
|
l10n.appTitle,
|
|
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
|
fontSize: 36,
|
|
letterSpacing: 1.2,
|
|
),
|
|
),
|
|
const SizedBox(height: 8),
|
|
Text(
|
|
l10n.subtitle,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
fontSize: 16,
|
|
),
|
|
),
|
|
const SizedBox(height: 48),
|
|
|
|
// Botones
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: ElevatedButton.icon(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (_) => const PantallaCrearPartida(),
|
|
),
|
|
);
|
|
},
|
|
icon: const Text('🎮', style: TextStyle(fontSize: 20)),
|
|
label: Text(l10n.createGame),
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: OutlinedButton.icon(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (_) => const PantallaUnirse(),
|
|
),
|
|
);
|
|
},
|
|
icon: const Text('📱', style: TextStyle(fontSize: 20)),
|
|
label: Text(l10n.joinGame),
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: OutlinedButton.icon(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (_) => const PantallaReglas(),
|
|
),
|
|
);
|
|
},
|
|
icon: const Text('📖', style: TextStyle(fontSize: 20)),
|
|
label: Text(l10n.howToPlay),
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: OutlinedButton.icon(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (_) => const PantallaAjustes(),
|
|
),
|
|
);
|
|
},
|
|
icon: const Icon(Icons.settings, size: 20),
|
|
label: Text(l10n.settings),
|
|
),
|
|
),
|
|
const SizedBox(height: 48),
|
|
|
|
Text(
|
|
l10n.playersRange,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
fontSize: 12,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|