fix(visualizador): add a discrete-bar rendering mode

Audit 1.7/2.5 (t4 lines 66-68, 120-122): the prototype draws 30
discrete bottom-anchored bars (radius 2, vertical gradient); the
build's VisualizadorAudio painted a single continuous oscilloscope
stroke, so its `barras: 30` parameter never produced bars.

Adds an opt-in `barrasDiscretas` mode (default false, byte-identical
continuous rendering preserved for any other caller) plus a
`gradienteFinAlpha` knob for the two screens' differing gradient
end-alpha (.3 vs .45). Wires it into the Escuchar hero and the full
player, correcting the player's bar count/height to match the
prototype (26->30 bars, 46->40px) at the same time.
This commit is contained in:
2026-07-30 00:04:03 +02:00
parent e94e64faca
commit fcba592352
6 changed files with 318 additions and 12 deletions
+3
View File
@@ -291,6 +291,9 @@ class _EscucharHero extends StatelessWidget {
barras: 30,
altura: 26,
color: context.pluriTokens.liveGreen,
// Audit 1.7 (t4 lines 66-68): 30 discrete
// bottom-anchored bars, not a continuous stroke.
barrasDiscretas: true,
),
],
),
+7 -2
View File
@@ -152,6 +152,7 @@ class _PantallaReproductorState extends State<PantallaReproductor> {
).pluriFadeIn(context, delay: const Duration(milliseconds: 230)),
const SizedBox(height: 14),
PluriGlassSurface(
key: const Key('player-visualizer'),
borderRadius: BorderRadius.circular(tokens.radiusLg),
padding: const EdgeInsets.symmetric(
horizontal: 14,
@@ -161,9 +162,13 @@ class _PantallaReproductorState extends State<PantallaReproductor> {
estadoStream: estado.estadoStream,
androidAudioSessionIdStream:
estado.audio.androidAudioSessionIdStream,
barras: 26,
// Audit 2.5 (t4 lines 120-122): 30 discrete bars at 40px,
// gradient ending at 45% alpha (not the hero's 30%).
barras: 30,
color: tokens.warmCoral,
altura: 46,
altura: 40,
barrasDiscretas: true,
gradienteFinAlpha: 0.45,
),
).pluriFadeIn(context, delay: const Duration(milliseconds: 270)),
const SizedBox(height: 22),