icon_decoration 1.0.1 copy "icon_decoration: ^1.0.1" to clipboard
icon_decoration: ^1.0.1 copied to clipboard

Add decoration capabilities for the Icon widget with shadows, borders, gradients.

icon_decoration #

Pub Version Test workflow Coverage Status

Add decoration capabilities for the Icon widget with shadows, borders, gradients. This new DecoratedIcon widget overlap itself with the base Icon widget to provide a more complete decoration system through a IconDecoration property.

Add to your project #

Add dependency to your pubspec.yaml #

icon_decoration: any

Import the package #

import 'package:icon_decoration/icon_decoration.dart';

How to use #

Add shadows to icons #

DecoratedIcon(
    icon: Icon(Icons.home, color: Colors.red),
    decoration: IconDecoration(
        shadows: [Shadow(blurRadius: 3, offset: Offset(3, 0))],
    ),
)

Add borders to icons #

DecoratedIcon(
    icon: Icon(Icons.favorite, color: Colors.green),
    decoration: IconDecoration(border: IconBorder()),
)

Add gradients to icons #

DecoratedIcon(
    icon: Icon(Icons.all_inbox),
    decoration: IconDecoration(
        gradient: _rainbowGradient,
    ),
)

Mix them all together #

DecoratedIcon(
    icon: Icon(Icons.all_inbox),
    decoration: IconDecoration(
        gradient: _rainbowGradient,
        border: IconBorder(),
        shadows: [
            Shadow(
                color: Colors.red,
                blurRadius: 3,
                offset: Offset(0, 2),
            )
        ],
    ),
)
84
likes
140
pub points
92%
popularity

Publisher

verified publisherrouxguillau.me

Add decoration capabilities for the Icon widget with shadows, borders, gradients.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on icon_decoration