A ver qué tal los nuevos botones ahora

This commit is contained in:
2026-05-11 21:10:39 +02:00
parent 8f3e907781
commit 9007728310
7 changed files with 232 additions and 273 deletions
+41 -62
View File
@@ -426,80 +426,59 @@ class _BotonInicioPremium extends StatelessWidget {
@override
Widget build(BuildContext context) {
final radius = BorderRadius.circular(hero ? 26 : 22);
final radius = BorderRadius.circular(hero ? 28 : 24);
return Material(
color: Colors.transparent,
child: InkWell(
borderRadius: radius,
onTap: onPressed,
child: Ink(
child: SizedBox(
height: height,
decoration: BoxDecoration(
gradient: gradient,
borderRadius: BorderRadius.circular(hero ? 26 : 22),
border: Border.all(
color: hero ? const Color(0xFFFFF0B8) : TemaApp.colorDorado.withValues(alpha: 0.34),
child: CustomPaint(
painter: MarcoBotonFaroleroPainter(
gradient: gradient,
destacado: hero,
habilitado: true,
radio: hero ? 28 : 24,
),
boxShadow: [
BoxShadow(
color: (hero ? TemaApp.colorNaranja : Colors.black).withValues(alpha: hero ? 0.46 : 0.42),
blurRadius: hero ? 34 : 18,
offset: const Offset(0, 12),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: hero ? 24 : 20,
vertical: hero ? 14 : 11,
),
],
),
child: ClipRRect(
borderRadius: radius,
child: Stack(
alignment: Alignment.center,
children: [
Positioned.fill(
child: Image.asset(
'assets/ui/generated/main/main_cta_frame.webp',
fit: BoxFit.cover,
opacity: AlwaysStoppedAnimation(hero ? 0.20 : 0.14),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: hero ? 50 : 42,
child: Icon(
icono,
color: foreground,
size: hero ? 38 : 29,
),
),
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: hero ? 18 : 16,
vertical: hero ? 14 : 11,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: hero ? 46 : 38,
child: Icon(
icono,
color: foreground,
size: hero ? 36 : 27,
const SizedBox(width: 10),
Expanded(
child: Center(
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
texto.toUpperCase(),
maxLines: 1,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: foreground,
fontSize: hero ? 30 : 19,
fontWeight: FontWeight.w900,
letterSpacing: hero ? 1.4 : 1.0,
),
),
),
const SizedBox(width: 10),
Expanded(
child: Center(
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
texto.toUpperCase(),
maxLines: 1,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: foreground,
fontSize: hero ? 28 : 18,
fontWeight: FontWeight.w900,
letterSpacing: hero ? 1.4 : 1.0,
),
),
),
),
),
SizedBox(width: hero ? 56 : 48),
],
),
),
),
],
SizedBox(width: hero ? 60 : 50),
],
),
),
),
),
@@ -33,7 +33,6 @@ class PantallaSeleccionModoJuego extends StatelessWidget {
).animate().fadeIn(duration: 320.ms).slideY(begin: -0.12),
const SizedBox(height: 34),
_ModoCard(
marcoAsset: 'assets/ui/generated/mode/mode_single_card_frame.webp',
icono: Icons.phone_android_rounded,
titulo: l10n.singleDevice,
subtitulo: l10n.singleDeviceSubtitle,
@@ -50,7 +49,6 @@ class PantallaSeleccionModoJuego extends StatelessWidget {
).animate().fadeIn(delay: 120.ms).slideX(begin: -0.08),
const SizedBox(height: 16),
_ModoCard(
marcoAsset: 'assets/ui/generated/mode/mode_multi_card_frame.webp',
icono: Icons.devices_rounded,
titulo: l10n.multiDevice,
subtitulo: l10n.multiDeviceSubtitle,
@@ -126,7 +124,6 @@ class _ModoHero extends StatelessWidget {
}
class _ModoCard extends StatelessWidget {
final String marcoAsset;
final IconData icono;
final String titulo;
final String subtitulo;
@@ -135,7 +132,6 @@ class _ModoCard extends StatelessWidget {
final VoidCallback onTap;
const _ModoCard({
required this.marcoAsset,
required this.icono,
required this.titulo,
required this.subtitulo,
@@ -179,13 +175,6 @@ class _ModoCard extends StatelessWidget {
child: Stack(
alignment: Alignment.center,
children: [
Positioned.fill(
child: Image.asset(
marcoAsset,
fit: BoxFit.cover,
opacity: AlwaysStoppedAnimation(destacado ? 0.22 : 0.18),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(18, 18, 14, 18),
child: Row(