Lalit Rawat
Lalit Rawat

Reputation: 1272

CircleAvatar show image out of the circle in actual shape

CircleAvatar show the image out of the circle and backgroundimage in CircleAvatar do not work with ImageFile

CircleAvatar(
        radius: 54,
        child: Image.file(state.image),
      );
    }

Upvotes: 1

Views: 67

Answers (1)

alordead
alordead

Reputation: 46

Just try to use CircleAvatar backgroundImage property. If you need to use image from some file, you can provide it using FileImage class. For example:

 CircleAvatar(
                  radius: 54,
                  backgroundImage: FileImage(state.image),
                ),

Result:

enter image description here

Upvotes: 1

Related Questions