Whether it can be pressed: a command with onPressed, or a submenu with children.
bool get enabled { return onPressed != null || (children?.isNotEmpty ?? false); }