Gets the preferred height of the widget.
This is used by the parent Container to help layout the widget.