Flutter CircleAvatar backgroundImage not filling up the circle Flutter CircleAvatar backgroundImage not filling up the circle flutter flutter

Flutter CircleAvatar backgroundImage not filling up the circle


You can always create an image and manually clip it:

ClipOval(  child: Image.network(    "url.jpg",    fit: BoxFit.cover,    width: 90.0,    height: 90.0,  )),


If you are using a local image from asset then you can use CircleAvatar as,

CircleAvatar(          backgroundImage: ExactAssetImage('assets/images/cook.jpeg'),          // Optional as per your use case          // minRadius: 30,          // maxRadius: 70,        ),

If you are using a network image then you can use CircleAvatar as,

CircleAvatar(     radius: 30.0,     backgroundImage: NetworkImage(imageURL),     backgroundColor: Colors.transparent,     ));


This is my working example:

Stack(                fit: StackFit.expand,                children: <Widget>[                  CircleAvatar(                    radius: 30.0,                    backgroundImage:                        NetworkImage("https://via.placeholder.com/150/92c952"),                    backgroundColor: Colors.transparent,                  ),                  Padding(                    padding: const EdgeInsets.all(20.0),                    child: Image.asset(                      'assets/photo-camera.png',                      width: 20.9,                      height: 19.9,                    ),                  ),                ],              ))