feat(ui): implement award mockup redesign
This commit is contained in:
@@ -10,13 +10,15 @@ class PluriGlassSurface extends StatelessWidget {
|
||||
required this.child,
|
||||
this.padding = const EdgeInsets.all(16),
|
||||
this.borderRadius,
|
||||
this.blurSigma = 14,
|
||||
this.blurSigma = 18,
|
||||
this.glowColor,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
final EdgeInsetsGeometry padding;
|
||||
final BorderRadius? borderRadius;
|
||||
final double blurSigma;
|
||||
final Color? glowColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -32,6 +34,14 @@ class PluriGlassSurface extends StatelessWidget {
|
||||
color: t.glassSurface,
|
||||
borderRadius: radius,
|
||||
border: Border.all(color: t.glassBorder),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: glowColor ?? t.glowColor.withValues(alpha: 0.12),
|
||||
blurRadius: 30,
|
||||
spreadRadius: -14,
|
||||
offset: const Offset(0, 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(padding: padding, child: child),
|
||||
),
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../tema/pluriwave_theme.dart';
|
||||
import 'pluri_glass_surface.dart';
|
||||
import 'pluri_icon.dart';
|
||||
|
||||
class PluriScreenHeader extends StatelessWidget {
|
||||
const PluriScreenHeader({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.subtitle,
|
||||
required this.glyph,
|
||||
this.primaryActionLabel,
|
||||
this.onPrimaryAction,
|
||||
this.trailing,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final String subtitle;
|
||||
final PluriIconGlyph glyph;
|
||||
final String? primaryActionLabel;
|
||||
final VoidCallback? onPrimaryAction;
|
||||
final Widget? trailing;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final t = context.pluriTokens;
|
||||
final theme = Theme.of(context);
|
||||
return Padding(
|
||||
padding: EdgeInsets.fromLTRB(t.spacingMd, t.spacingSm, t.spacingMd, t.spacingSm),
|
||||
child: PluriGlassSurface(
|
||||
borderRadius: BorderRadius.circular(t.radiusLg + 8),
|
||||
padding: const EdgeInsets.all(18),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
right: -36,
|
||||
top: -42,
|
||||
child: _Orb(color: t.electricMagenta.withValues(alpha: 0.38), size: 128),
|
||||
),
|
||||
Positioned(
|
||||
right: 44,
|
||||
bottom: -54,
|
||||
child: _Orb(color: const Color(0xFF20E6FF).withValues(alpha: 0.22), size: 116),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 56,
|
||||
height: 56,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
const Color(0xFF20E6FF).withValues(alpha: 0.95),
|
||||
t.electricMagenta,
|
||||
t.warmCoral,
|
||||
],
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(color: t.glowColor, blurRadius: 28, spreadRadius: 2),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: PluriIcon(glyph: glyph, variant: PluriIconVariant.filled, size: 28),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: theme.textTheme.headlineSmall?.copyWith(
|
||||
fontWeight: FontWeight.w900,
|
||||
letterSpacing: -0.7,
|
||||
height: 1.02,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
subtitle,
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: theme.colorScheme.onSurface.withValues(alpha: 0.76),
|
||||
height: 1.25,
|
||||
),
|
||||
),
|
||||
if (primaryActionLabel != null) ...[
|
||||
const SizedBox(height: 12),
|
||||
FilledButton.tonalIcon(
|
||||
onPressed: onPrimaryAction,
|
||||
icon: const Icon(Icons.auto_awesome_rounded, size: 18),
|
||||
label: Text(primaryActionLabel!),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
if (trailing != null) trailing!,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class PluriStatusPill extends StatelessWidget {
|
||||
const PluriStatusPill({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
this.accent,
|
||||
});
|
||||
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final Color? accent;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final t = context.pluriTokens;
|
||||
final color = accent ?? t.electricMagenta;
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
color: color.withValues(alpha: 0.13),
|
||||
border: Border.all(color: color.withValues(alpha: 0.38)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(icon, size: 16, color: color),
|
||||
const SizedBox(width: 7),
|
||||
Text(label, style: Theme.of(context).textTheme.labelMedium?.copyWith(fontWeight: FontWeight.w800)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class PluriEmptyState extends StatelessWidget {
|
||||
const PluriEmptyState({
|
||||
super.key,
|
||||
required this.glyph,
|
||||
required this.title,
|
||||
required this.subtitle,
|
||||
});
|
||||
|
||||
final PluriIconGlyph glyph;
|
||||
final String title;
|
||||
final String subtitle;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final t = context.pluriTokens;
|
||||
final theme = Theme.of(context);
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: PluriGlassSurface(
|
||||
borderRadius: BorderRadius.circular(t.radiusLg + 10),
|
||||
padding: const EdgeInsets.all(28),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
PluriIcon(glyph: glyph, variant: PluriIconVariant.activeGlow, size: 58),
|
||||
const SizedBox(height: 18),
|
||||
Text(title, textAlign: TextAlign.center, style: theme.textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w900)),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
subtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.onSurface.withValues(alpha: 0.72)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _Orb extends StatelessWidget {
|
||||
const _Orb({required this.color, required this.size});
|
||||
|
||||
final Color color;
|
||||
final double size;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IgnorePointer(
|
||||
child: Container(
|
||||
width: size,
|
||||
height: size,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: RadialGradient(colors: [color, color.withValues(alpha: 0)]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -24,20 +24,62 @@ class PluriWaveScaffold extends StatelessWidget {
|
||||
appBar: appBar,
|
||||
bottomNavigationBar: bottomNavigationBar,
|
||||
floatingActionButton: floatingActionButton,
|
||||
extendBody: true,
|
||||
body: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: RadialGradient(
|
||||
center: const Alignment(-0.75, -0.9),
|
||||
radius: 1.25,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
t.electricMagenta.withValues(alpha: 0.22),
|
||||
const Color(0xFF070A18),
|
||||
t.deepViolet,
|
||||
const Color(0xFF10091B),
|
||||
const Color(0xFF151033),
|
||||
const Color(0xFF070A18),
|
||||
],
|
||||
stops: const [0.0, 0.42, 1.0],
|
||||
stops: const [0, 0.34, 0.68, 1],
|
||||
),
|
||||
),
|
||||
child: body,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Positioned(
|
||||
left: -120,
|
||||
top: -120,
|
||||
child: _AuroraOrb(size: 300, color: const Color(0xFF20E6FF).withValues(alpha: 0.32)),
|
||||
),
|
||||
Positioned(
|
||||
right: -150,
|
||||
top: 160,
|
||||
child: _AuroraOrb(size: 340, color: t.electricMagenta.withValues(alpha: 0.26)),
|
||||
),
|
||||
Positioned(
|
||||
left: -90,
|
||||
bottom: 80,
|
||||
child: _AuroraOrb(size: 260, color: t.warmCoral.withValues(alpha: 0.16)),
|
||||
),
|
||||
body,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AuroraOrb extends StatelessWidget {
|
||||
const _AuroraOrb({required this.size, required this.color});
|
||||
final double size;
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IgnorePointer(
|
||||
child: Container(
|
||||
width: size,
|
||||
height: size,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: RadialGradient(colors: [color, color.withValues(alpha: 0)]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,32 @@ class _TarjetaEmisoraState extends State<TarjetaEmisora> {
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AspectRatio(aspectRatio: 1, child: _logo(60)),
|
||||
AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
_logo(60),
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black.withValues(alpha: 0.34),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: t.spacingSm,
|
||||
bottom: t.spacingSm,
|
||||
child: _LiveBadge(mini: true),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
t.spacingMd,
|
||||
@@ -140,9 +165,25 @@ class _TarjetaEmisoraState extends State<TarjetaEmisora> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(t.radiusSm),
|
||||
child: SizedBox(width: 48, height: 48, child: _logo(24)),
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 58,
|
||||
height: 58,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: SweepGradient(
|
||||
colors: [t.electricMagenta, const Color(0xFF20E6FF), t.warmCoral, t.electricMagenta],
|
||||
),
|
||||
boxShadow: [BoxShadow(color: t.glowColor.withValues(alpha: 0.24), blurRadius: 22)],
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
child: SizedBox(width: 50, height: 50, child: _logo(24)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: t.spacingSm),
|
||||
Expanded(
|
||||
@@ -172,6 +213,8 @@ class _TarjetaEmisoraState extends State<TarjetaEmisora> {
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_LiveBadge(mini: false),
|
||||
_botonFavorito(mini: false),
|
||||
],
|
||||
),
|
||||
@@ -271,6 +314,35 @@ class _TarjetaEmisoraState extends State<TarjetaEmisora> {
|
||||
}
|
||||
}
|
||||
|
||||
class _LiveBadge extends StatelessWidget {
|
||||
const _LiveBadge({required this.mini});
|
||||
|
||||
final bool mini;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = Theme.of(context).colorScheme.secondary;
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: mini ? 8 : 6, vertical: mini ? 5 : 4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
color: Colors.black.withValues(alpha: 0.35),
|
||||
border: Border.all(color: color.withValues(alpha: 0.48)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.fiber_manual_record_rounded, size: mini ? 10 : 8, color: color),
|
||||
if (mini) ...[
|
||||
const SizedBox(width: 5),
|
||||
Text('Live', style: Theme.of(context).textTheme.labelSmall?.copyWith(fontWeight: FontWeight.w900)),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Placeholder shimmer para listas en carga.
|
||||
class TarjetaEmisoraShimmer extends StatelessWidget {
|
||||
const TarjetaEmisoraShimmer({super.key});
|
||||
|
||||
Reference in New Issue
Block a user