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
Thanks for the answers. This one helped me a bit more:
flutter ListView children size
I ended up with code like this:
var sizeW = MediaQuery.of(context).size.width;
var leftCut = 0.0;
var rightCut = 0.0;
if (sizeW > WEB_MAX_WIDTH) {
leftCut = (sizeW - WEB_MAX_WIDTH) / 2;
rightCut = leftCut;
}
And then use those like this:
return Container(
margin: EdgeInsets.only(right:rightCut, left: leftCut),
padding:
EdgeInsets.only(left: (_fullList[index].level * 30.0)),
child: Card(
child: ListTile(
...