fix: Make audioplayer waveforms thinner and better clickable

This commit is contained in:
Christian Pauly 2022-03-28 20:13:20 +02:00
parent fc2846c085
commit 9eaf20d903
1 changed files with 13 additions and 9 deletions

View File

@ -215,15 +215,19 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
(maxPosition / AudioPlayerWidget.wavesCount)
.round() *
i)),
child: Opacity(
opacity: currentPosition > i ? 1 : 0.5,
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 1),
decoration: BoxDecoration(
color: widget.color,
borderRadius: BorderRadius.circular(64),
),
height: 64 * (waveform[i] / 1024)),
child: Container(
height: 32,
alignment: Alignment.center,
child: Opacity(
opacity: currentPosition > i ? 1 : 0.5,
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 1),
decoration: BoxDecoration(
color: widget.color,
borderRadius: BorderRadius.circular(64),
),
height: 32 * (waveform[i] / 1024)),
),
),
),
)