IconDataExtension extension

Extension methods for IconData that provide convenient icon creation functionality.

This extension adds methods to easily convert IconData objects into Icon widgets with various styling and configuration options. All methods return new Icon widgets.

The extension provides both comprehensive control (icon) and convenient shortcuts for common icon configurations (iconSized, iconFilled, iconColored).

Example usage:

Icons.star
  .icon(size: 24, color: Colors.yellow)
  .iconSized(32)
  .iconColored(Colors.blue);
on

Methods

icon({double? size, double? fill, double? weight, double? grade, double? opticalSize, Color? color, List<Shadow>? shadows, String? semanticLabel, TextDirection? textDirection, bool? applyTextScaling, BlendMode? blendMode}) Icon

Available on IconData, provided by the IconDataExtension extension

Converts the IconData to an Icon widget with optional styling.
iconColored(Color color) Icon

Available on IconData, provided by the IconDataExtension extension

Converts the IconData to an Icon widget with a specific color.
iconFilled(double fill) Icon

Available on IconData, provided by the IconDataExtension extension

Converts the IconData to an Icon widget with a specific fill value.
iconSized(double size) Icon

Available on IconData, provided by the IconDataExtension extension

Converts the IconData to an Icon widget with a specific size.