I'm trying to create a whatsapp like chat view, with a reply message box within a chat message...as below
The problem I'm facing is to expand the left brown vertical border box to the height of the Column (with dynamic texts) on its right.
I used the Intrinsic height option as below to make it work
IntrinsicHeight(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
width: 4,
// constraints: BoxConstraints.expand(width: 4),
decoration: BoxDecoration(
color: _postColor,
borderRadius: const BorderRadius.only(
topLeft: const Radius.circular(4.0),
bottomLeft: const Radius.circular(4.0)),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(6, 4, 8, 4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(msg?.postByName),
Text(msg?.message ?? ''),
],
),
),
),
],
),
)
Since the chats can be very long, and the reply boxes many, I'm concerned about using the expensive IntrinsicHeight widget.
What I've tried already:
- Expanded on the brown container does not work as all of this is in a scrollable view of the page. so the expanded makes the box full screen.
- Constraints on the container don't work, content vanishes.
- Adding borderside on the container was an idea, but Containers don't allow curved borderRadius with borderside.
Any other ideas?

