I\'m trying to make a design of a chat screen for an app that I\'m making. To make it scrollable I placed all the chat messages inside a listview. But everything I place inside
I know this is a bit late but this may be the easiest solution. I don't know if this is a good practice or not (you may comment below if it is not).
What I did is I wrapped the message (I mean the widget that contains the message) into a row and added a Spacer()
widget at first or in last depending upon whether the message is on right side or on left
So the code might look something like (The code below is for message on the left side)
Row(
children: [
Card(
color: Colors.green,
child: new Padding(
padding: new EdgeInsets.all(7.0),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
new Text('Message'),
new Text('17:00'),
],
),
),
)
Spacer(),
]
)