[MessageReactionsModal] Fix user online indicator size, reaction bubble alignment

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-13 19:02:59 +05:30
parent 618acbc4e7
commit 60c3118cd8
2 changed files with 13 additions and 7 deletions
+9 -3
View File
@@ -217,6 +217,7 @@ class MessageReactionsModal extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Stack( Stack(
overflow: Overflow.visible,
children: [ children: [
UserAvatar( UserAvatar(
onTap: onUserAvatarTap, onTap: onUserAvatarTap,
@@ -225,6 +226,10 @@ class MessageReactionsModal extends StatelessWidget {
height: 64, height: 64,
width: 64, width: 64,
), ),
onlineIndicatorConstraints: BoxConstraints.tightFor(
height: 12,
width: 12,
),
borderRadius: BorderRadius.circular(32), borderRadius: BorderRadius.circular(32),
), ),
Positioned( Positioned(
@@ -236,13 +241,14 @@ class MessageReactionsModal extends StatelessWidget {
flipTail: !reverse, flipTail: !reverse,
borderColor: messageTheme.reactionsBorderColor, borderColor: messageTheme.reactionsBorderColor,
backgroundColor: messageTheme.reactionsBackgroundColor, backgroundColor: messageTheme.reactionsBackgroundColor,
maskColor: messageTheme.reactionsMaskColor, maskColor: StreamChatTheme.of(context).colorTheme.white,
tailCirclesSpacing: 1,
highlightOwnReactions: false, highlightOwnReactions: false,
), ),
), ),
bottom: 6, bottom: 6,
left: isCurrentUser ? 0 : null, left: isCurrentUser ? -3 : null,
right: isCurrentUser ? 0 : null, right: isCurrentUser ? -3 : null,
), ),
], ],
), ),
+4 -4
View File
@@ -16,7 +16,7 @@ class ReactionBubble extends StatelessWidget {
this.reverse = false, this.reverse = false,
this.flipTail = false, this.flipTail = false,
this.highlightOwnReactions = true, this.highlightOwnReactions = true,
this.tailCirclesSpace = 0, this.tailCirclesSpacing = 0,
}) : super(key: key); }) : super(key: key);
final List<Reaction> reactions; final List<Reaction> reactions;
@@ -26,7 +26,7 @@ class ReactionBubble extends StatelessWidget {
final bool reverse; final bool reverse;
final bool flipTail; final bool flipTail;
final bool highlightOwnReactions; final bool highlightOwnReactions;
final double tailCirclesSpace; final double tailCirclesSpacing;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@@ -45,7 +45,7 @@ class ReactionBubble extends StatelessWidget {
padding: const EdgeInsets.all(2), padding: const EdgeInsets.all(2),
decoration: BoxDecoration( decoration: BoxDecoration(
color: maskColor, color: maskColor,
borderRadius: BorderRadius.all(Radius.circular(14)), borderRadius: BorderRadius.all(Radius.circular(16)),
), ),
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
@@ -148,7 +148,7 @@ class ReactionBubble extends StatelessWidget {
backgroundColor, backgroundColor,
borderColor, borderColor,
maskColor, maskColor,
tailCirclesSpace: tailCirclesSpace, tailCirclesSpace: tailCirclesSpacing,
), ),
); );
return Transform( return Transform(