Tweak mute icon in video player

This commit is contained in:
Ming Ming 2022-12-26 11:34:56 +08:00
parent 22fd922125
commit 34ee7bbe19

View file

@ -224,10 +224,17 @@ class _VideoViewerState extends State<VideoViewer>
onTap: _onVolumnPressed, onTap: _onVolumnPressed,
child: Padding( child: Padding(
padding: const EdgeInsets.all(4), padding: const EdgeInsets.all(4),
child: Icon( child: AnimatedSwitcher(
_controller.value.volume == 0 duration: k.animationDurationNormal,
? Icons.volume_mute_outlined child: _controller.value.volume == 0
: Icons.volume_up, ? const Icon(
Icons.volume_off_outlined,
key: Key("mute_on"),
)
: const Icon(
Icons.volume_up_outlined,
key: Key("mute_off"),
),
), ),
), ),
), ),