From 34ee7bbe19829ab9728456a11a979a811f9cc6e5 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Mon, 26 Dec 2022 11:34:56 +0800 Subject: [PATCH] Tweak mute icon in video player --- app/lib/widget/video_viewer.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/lib/widget/video_viewer.dart b/app/lib/widget/video_viewer.dart index bebf5877..964caddd 100644 --- a/app/lib/widget/video_viewer.dart +++ b/app/lib/widget/video_viewer.dart @@ -224,10 +224,17 @@ class _VideoViewerState extends State onTap: _onVolumnPressed, child: Padding( padding: const EdgeInsets.all(4), - child: Icon( - _controller.value.volume == 0 - ? Icons.volume_mute_outlined - : Icons.volume_up, + child: AnimatedSwitcher( + duration: k.animationDurationNormal, + child: _controller.value.volume == 0 + ? const Icon( + Icons.volume_off_outlined, + key: Key("mute_on"), + ) + : const Icon( + Icons.volume_up_outlined, + key: Key("mute_off"), + ), ), ), ),