From 97a524ecf9a956f173cf0fafd1e0018a24757eab Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sat, 8 Feb 2020 13:09:53 +0800 Subject: [PATCH] fix(gh): reaction active color --- lib/widgets/comment_item.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/widgets/comment_item.dart b/lib/widgets/comment_item.dart index 8d92cbc..9245a9a 100644 --- a/lib/widgets/comment_item.dart +++ b/lib/widgets/comment_item.dart @@ -30,12 +30,6 @@ class GhEmojiAction extends StatefulWidget { } class _GhEmojiActionState extends State { - Decoration _getDecorationByKey(String emojiKey) { - return BoxDecoration( - color: _hasReacted(emojiKey) ? PrimerColors.blue000 : Colors.transparent, - ); - } - get payload => widget.payload; onReaction(String emojiKey) async { @@ -81,7 +75,13 @@ mutation { }, child: Container( padding: EdgeInsets.all(4), - decoration: _getDecorationByKey(emojiKey), + decoration: BoxDecoration( + color: _hasReacted(emojiKey) + ? (theme.brightness == Brightness.dark + ? PrimerColors.blue900 + : PrimerColors.blue000) + : Colors.transparent, + ), child: Wrap( crossAxisAlignment: WrapCrossAlignment.center, children: [