Reputation: 935
Expected output:
This is a combination of a circle avatar with the color and and image on top of it.
Current output:
Code:
leading: CircleAvatar(backgroundColor: contentWithIcon[value]['color']),
How do i overlap both on top of each other?
image path:
assets/img/forex.png
Upvotes: 1
Views: 1033
Reputation: 136
You don't need to overlap them or use the stack widget, CircleAvatar will handle this for you.
CircleAvatar(backgroundColor: contentWithIcon[value]['color'],
child: Image.asset("assets/img/forex.png "),)
be sure assets folder is added in pubspec.yaml
assets:
- assets/
Upvotes: 6