readIconButtonEnabled function
Enabled state for observed icon rows — only when this is an icon button.
Decorative Icons under a parent InkWell must not report enabled: true.
Implementation
bool? readIconButtonEnabled(Element element) {
final iconButton = _selfOrAncestor<IconButton>(element);
if (iconButton != null) return iconButton.onPressed != null;
if (!_hasIconButtonAncestor(element) &&
!_isIconButtonWidget(element.widget)) {
return null;
}
return readEnabled(element);
}