0
I’m not able to leave my image in my Listtile, when I try to scale it only goes horizontal and never vertical, example:
Following code, I’m trying to scale with the property Radius:
ListView.separated(
separatorBuilder: (context,index) => Divider(
color: Colors.black),
itemCount: _professionals.length,
itemBuilder: (context,index){
return
ListTile(
contentPadding: EdgeInsets.all(15.0),
leading:
CircleAvatar(
backgroundImage: AssetImage("images/perfil_anhan.jpg"),
radius: 70,
),
title: (Text(getName(_professionals[index]))),
...
How could I make her proportional?
Try to use the attribute
child
ofCircleAvatar
instead ofbackgroundImage
. Within thechild
use theImage.asset()
and fill in the propertyfit
which is used to adjust the images inside your containers. Example:CircleAvatar(child: Image.asset("name", fit: BoxFit.contain,),);
– Leonardo Paim
Hello Matheus, I could not solve this way, but gave me a light and I managed to solve otherwise. I’ll put down, thank you!
– Állan Coinaski
Alian, has no answer met your need? If not, explain better what you need so we can solve.
– rbz