How to give a gradient color to CircleAvatar();
widget in flutter ?
I was able to achieve the functionality I was looking for by using a Container as child of CircleAvatar and giving gradient properties to the Container.
CircleAvatar(
radius: 40,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
colors: [
color1,
color2,
],
),
),
),
),