flutter_icon_shadow 2.0.7 copy "flutter_icon_shadow: ^2.0.7" to clipboard
flutter_icon_shadow: ^2.0.7 copied to clipboard

Adds shadow under an icon in Flutter. Customizable with color, blur and offset.

Flutter Icon Shadow #

Drop a shadow below your icons. Customizable color, blur sigma, and offset.

Forked from icon_shadow package for adding null safety, and more features.

sample

How to use #

1. Add dependencies to pubspec.yaml #

flutter pub add flutter_icon_shadow

2. Add icons #

Simply wrap your icon with IconShadow, which accepts an Icon widget as the first argument.

More arguments are available: Color? shadowColor, double shadowBlurSigma = 0.9, and Offset shadowOffset = Offset.zero.

Row(
  mainAxisAlignment: MainAxisAlignment.center,
  children: <Widget>[
    IconShadow(
      Icon(
        Icons.lightbulb_outline,
        color: Colors.lightBlueAccent,
        size: 36,
      ),
    ),
    IconShadow(
      Icon(
        Icons.lightbulb_outline,
        color: Colors.lightBlueAccent,
        size: 36,
      ),
      shadowColor: Colors.lightBlueAccent.shadow100,
      shadowOffset: Offset(2, 2), // optional, may cause clipping by bounding box
    ),
    IconShadow(
      Icon(
        Icons.lightbulb_outline,
        color: Colors.lightBlueAccent,
        size: 36,
      ),
      showShadow: false,
    ),
  ],
)
2
likes
140
pub points
79%
popularity

Publisher

verified publishercasraf.dev

Adds shadow under an icon in Flutter. Customizable with color, blur and offset.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_lints

More

Packages that depend on flutter_icon_shadow