I want each user to be stacked, neat as in the picture how can i make user assign look stacked? i want like this :
Remember to calculate distance carefully. I use
Positioned
and calculateleft distance = (WIDTH - 30) * index
. It is kinda same as your images, just adjust few things, then OK. Good luck!CodePudding user response:
This is how i usually do stacked widgets like that. try it out
Stack( clipBehavior: Clip.none, children: [ for (var i = 0; i < yourList.length; i ) Container( //* you can adjust the margin here base on your desired output margin: EdgeInsets.only(left: 12 * i.toDouble()), child: ClipRRect( borderRadius: BorderRadius.circular(8), child: Image.asset( 'asset/img/profile_photo.png', width: 40, height: 40, ), ), ), ]),