Leading Image overflows in ListTile
You should use CircleAvatar
as leading
in your ListTile
. It has a radius
property also that you can change, if you wish.
leading: CircleAvatar(
backgroundImage: AssetImage("..."), // no matter how big it is, it won't overflow
),
If you wanna use rectangle image, you an use
leading: ConstrainedBox(
constraints: BoxConstraints(
minWidth: 44,
minHeight: 44,
maxWidth: 64,
maxHeight: 64,
),
child: Image.asset(profileImage, fit: BoxFit.cover),
),
Do this:
leading: SizedBox(
height: 100.0,
width: 100.0, // fixed width and height
child: Image.asset(...)
)