Icon class

DSL node for an Icon widget.

Usage

Icon(
  icon: 'star',
  key: Key('my_icon'),
  color: 'Colors.amber',
  size: 32,
)

Supported icon names include: home, back, forward, menu, close, search, settings, add, edit, delete, share, star, favorite, person, location, calendar, cart, payment, and many more. See icon_builder.dart for the full list.

Inheritance

Constructors

Icon({Key? key, required String icon, String? color, double? size})

Properties

color String?
final
hashCode int
The hash code for this object.
no setterinherited
icon String
Icon name string (e.g. 'star', 'home', 'edit').
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialises this node and all its children into the SDUI JSON format.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited