How to convert icon to image in flutter?

Viewed 6264

I have a flutter app and I want to be able to display the check mark icon in a CircleAvatar widget. Is this possible to do with the existing icons and so I don't have to download a check mark icon into my assets?

2 Answers

Yes you can do it by using Icon widget in your circleAvatar

For example

CircleAvatar(
  child:Icon(
    Icons.check
  ),
),

Here is working Example

class MyWidget extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return CircleAvatar(  child:Icon(
          Icons.check,
          color: Colors.pink,
          size: 24.0,
          semanticLabel: 'Text to announce in accessibility modes',
        )
    );
      }
    }

enter image description here

Related