Search code examples
dartflutter

How can I add shadow to an icon in flutter?


I need to add shadows to some icons in my flutter project. I've checked the icon class constructors but nothing points to that. Any idea on how to implement that?


Solution

  • I got what i wanted eventually using this workaround. I hope it helps whoever might need something similar.

    Stack(
      children: <Widget>[
        Positioned(
          left: 1.0,
          top: 2.0,
          child: Icon(icon, color: Colors.black54),
        ),
        Icon(icon, color: Colors.white),
      ],
    ),