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,
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"),
),
),
),
),