Zakria Khan
Zakria Khan

Reputation: 2203

How to use Outline Border for Icon in flutter?

hello I want to use icon a which is filled with color. I want it empty and I want to use border / stroke for it. so that the icon look like empty icon with border. I want to do it in flutter . I will be using material icon. remember the icon I am trying to use does not has an exciting outline icon. I made a vector in xd and save it as svg and then use package to use that package and achieve what I want. but I want it to do it with out using png svg .

I want away so that I can use the existing icon from material icons or fonts awesome icon.

if any body know any workout for it then please share it. thanks.

Upvotes: 2

Views: 4869

Answers (1)

Loïc Fonkam
Loïc Fonkam

Reputation: 2340

Use the RawMaterialButton and customise your icons into any shape.

 RawMaterialButton(
    elevation: 2.0,
    onPressed: () {},
    child: new Icon(
       Icons.next,
       color: Colors.any,
       size: 45,
    ),
    shape: CircleBorder(),

    fillColor: Colors.white,
    padding: const EdgeInsets.all(10.0),
),

Upvotes: 3

Related Questions