From 77400bbe42f63f29fa75b8d64c73bd7babb0eac4 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Wed, 29 Jun 2022 19:37:56 -0400 Subject: [PATCH] Animate fade emote menu show/hide (#90) --- lib/screens/channel/chat/chat.dart | 7 ++++++- .../channel/chat/emote_menu/recent_emotes_panel.dart | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/screens/channel/chat/chat.dart b/lib/screens/channel/chat/chat.dart index 586d74eb..0c3002dd 100644 --- a/lib/screens/channel/chat/chat.dart +++ b/lib/screens/channel/chat/chat.dart @@ -123,7 +123,12 @@ class Chat extends StatelessWidget { curve: Curves.ease, duration: const Duration(milliseconds: 200), height: chatStore.assetsStore.showEmoteMenu ? MediaQuery.of(context).size.height / 3 : 0, - child: chatStore.assetsStore.showEmoteMenu ? EmoteMenu(chatStore: chatStore) : null, + child: AnimatedOpacity( + curve: Curves.ease, + opacity: chatStore.assetsStore.showEmoteMenu ? 1 : 0, + duration: const Duration(milliseconds: 200), + child: EmoteMenu(chatStore: chatStore), + ), onEnd: () => chatStore.scrollController.jumpTo(chatStore.scrollController.position.maxScrollExtent), ), ], diff --git a/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart b/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart index 01096664..cb5f888b 100644 --- a/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart +++ b/lib/screens/channel/chat/emote_menu/recent_emotes_panel.dart @@ -58,7 +58,8 @@ class _RecentEmotesPanelState extends State { padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0), ), const Spacer(), - SizedBox( + Container( + padding: const EdgeInsets.symmetric(horizontal: 5.0), height: 25, child: Button( padding: const EdgeInsets.all(0.0),