wip: testing positioned list

This commit is contained in:
Gordon Hayes
2021-09-08 11:48:26 +02:00
parent 386df52048
commit 2badecbde6
3 changed files with 150 additions and 134 deletions
@@ -74,6 +74,7 @@ class MessageWidget extends StatefulWidget {
this.showInChannelIndicator = false,
this.onReplyTap,
this.onThreadTap,
this.actualIndex,
this.showUsername = true,
this.showTimestamp = true,
this.showReactions = true,
@@ -257,6 +258,8 @@ class MessageWidget extends StatefulWidget {
}..addAll(customAttachmentBuilders ?? {}),
super(key: key);
final int? actualIndex;
/// Function called on mention tap
final void Function(User)? onMentionTap;
@@ -590,6 +593,10 @@ class _MessageWidgetState extends State<MessageWidget>
@override
Widget build(BuildContext context) {
super.build(context);
return Container(
decoration: BoxDecoration(border: Border.all()),
child: Text('${widget.message.text ?? 'valu'} ${widget.actualIndex}'),
);
final avatarWidth =
widget.messageTheme.avatarTheme?.constraints.maxWidth ?? 40;
final bottomRowPadding =
@@ -658,6 +665,7 @@ class _MessageWidgetState extends State<MessageWidget>
SizedBox(width: avatarWidth + 4),
Flexible(
child: PortalEntry(
visible: false,
portal: Container(
transform: Matrix4.translationValues(
widget.reverse ? 12 : -12, 0, 0),