Skip to content

Commit 1f2965d

Browse files
committed
emoji: Ensure consistent row height for plain text emoji theme.
1 parent 3ae958e commit 1f2965d

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

lib/widgets/emoji_reaction.dart

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ class EmojiPickerListEntry extends StatelessWidget {
545545
final EmojiCandidate emoji;
546546

547547
static const _emojiSize = 24.0;
548+
static const _rowMinHeight = _emojiSize + 20;
548549

549550
void _onPressed() {
550551
Navigator.pop(pageContext, emoji);
@@ -578,20 +579,22 @@ class EmojiPickerListEntry extends StatelessWidget {
578579
: Colors.transparent),
579580
child: Padding(
580581
padding: const EdgeInsets.symmetric(horizontal: 8),
581-
child: Row(spacing: 4, children: [
582-
if (glyph != null)
583-
Padding(
584-
padding: const EdgeInsets.all(10),
585-
child: glyph),
586-
Flexible(child: Text(label,
587-
maxLines: 2,
588-
overflow: TextOverflow.ellipsis,
589-
style: TextStyle(
590-
fontSize: 17,
591-
height: 18 / 17,
592-
color: designVariables.textMessage)))
593-
]),
594-
));
582+
child: ConstrainedBox(
583+
constraints: const BoxConstraints(minHeight: _rowMinHeight),
584+
child: Row(spacing: 4, children: [
585+
if (glyph != null)
586+
Padding(
587+
padding: const EdgeInsets.all(10),
588+
child: glyph),
589+
Flexible(child: Text(label,
590+
maxLines: 2,
591+
overflow: TextOverflow.ellipsis,
592+
style: TextStyle(
593+
fontSize: 17,
594+
height: 18 / 17,
595+
color: designVariables.textMessage)))
596+
]),
597+
)));
595598
}
596599
}
597600

0 commit comments

Comments
 (0)