My Car
My Car

Reputation: 4566

How to add an image inside the circle and make the border have color in Flutter?

I am new in Flutter. I want to add an image inside the circle and make the border have color.

image

I would appreciate any help.

Upvotes: 1

Views: 1165

Answers (1)

Javad Zobeidi
Javad Zobeidi

Reputation: 191

you can use CircleAvatar or Container with BoxDecoration

Container(
          width:105.0,
          height: 105.0,
          padding: const EdgeInsets.all(8.0),
          decoration: BoxDecoration(
            shape: BoxShape.circle,
            border: Border.all(width: 1,color: Colors.blue),
            image: DecorationImage(
              fit: BoxFit.fill,
              image: NetworkImage("https://picsum.photos/500/300?random=1")
            )
          )
        )

Upvotes: 1

Related Questions