I want to color half of my Circle Avatar as Dark Blue and other half to be Light Blue. I mean Exactly half. How can I achieve this?
Just Like them -
I tried this, but it didn't worked -
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xFF040663),
Color(0xFF434599),
],
),
),
child: CircleAvatar(
backgroundColor: Colors.transparent,
radius: MediaQuery.of(context).size.height*0.045,
child: Icon(
icon,
size: size,
color: Colors.white,
),
),
),
Can someone tell me how can i edit this code, or tell me a new way to achieve this?

