From 603799ea324ba2ad5e6826e20fa861948f724c89 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 29 Dec 2024 23:52:48 +0800 Subject: [PATCH] :bug: Fix high quality icon issue --- lib/widgets/attachment/attachment_item.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/widgets/attachment/attachment_item.dart b/lib/widgets/attachment/attachment_item.dart index becb400..55413b7 100644 --- a/lib/widgets/attachment/attachment_item.dart +++ b/lib/widgets/attachment/attachment_item.dart @@ -315,6 +315,7 @@ class _AttachmentItemContentVideoState extends State<_AttachmentItemContentVideo } return MaterialDesktopVideoControlsTheme( + key: Key('material-desktop-video-controls-theme-$_showOriginal'), normal: MaterialDesktopVideoControlsThemeData( buttonBarButtonSize: 24, buttonBarButtonColor: Colors.white, @@ -324,14 +325,16 @@ class _AttachmentItemContentVideoState extends State<_AttachmentItemContentVideo MaterialDesktopCustomButton( iconSize: 24, onPressed: _toggleOriginal, - icon: Builder(builder: (context) { - return _showOriginal ? const Icon(Symbols.high_quality, size: 24) : const Icon(Symbols.sd, size: 24); - }), + icon: Icon( + _showOriginal ? Symbols.high_quality : Symbols.sd, + size: 24, + ), ), ], ), fullscreen: const MaterialDesktopVideoControlsThemeData(), child: MaterialVideoControlsTheme( + key: Key('material-video-controls-theme-$_showOriginal'), normal: MaterialVideoControlsThemeData( buttonBarButtonSize: 24, buttonBarButtonColor: Colors.white,