flutter circle image code example

Example 1: circle avatar from image asset flutter

CircleAvatar(
    radius: 16.0,
    child: ClipRRect(
        child: Image.asset('profile-generic.png'),
        borderRadius: BorderRadius.circular(50.0),
    ),
),

Example 2: Flutter give image rounded corners

ClipRRect(
    borderRadius: BorderRadius.circular(8.0),
    child: Image.network(
        subject['images']['large'],
        height: 150.0,
        width: 100.0,
    ),
)

Example 3: how to make an image contained in circle avatar in flutter

CircleAvatar(
                radius: 30.0,
                backgroundImage:
                    NetworkImage("${snapshot.data.hitsList[index].previewUrl}"),
                backgroundColor: Colors.transparent,
              )

Example 4: border at circleAvatar flutter

CircleAvatar(
    radius: 30,
    backgroundColor: Colors.teal,
    child: CircleAvatar(
      backgroundImage: AssetImage('assets/appdev.png'),
      radius: 28,
    ),
  ),