getWidgetStatePropertyIcon method

WidgetStateProperty<Icon>? getWidgetStatePropertyIcon(
  1. String key, {
  2. Icon? defaultValue,
})

Get the widget state property for icon

Implementation

WidgetStateProperty<Icon>? getWidgetStatePropertyIcon(String key,
    {Icon? defaultValue}) {
  Icon? iconMetaData = getFieldMeta(key, defaultValue);
  if (iconMetaData == null) {
    return null;
  }
  return WidgetStateProperty.all(iconMetaData);
}