PanelAutoSizing class Null safety

If provided, the panel's height will be automatically calculated based on the content. This technically modifies the PanelSize parameter as the panel's content size after panel is created. Also repeats this process when resolution of device changes. (e.g., Orientation change).

Note that even by setting this, please don't omit the PanelSize parameter. If the height is not calculatable, PanelSize parameters will be used.

Any height is maximum to screen size.

If this is used, when using a scrollable element, make sure it is shrinked. (e.g., When using ListView, set its shrinkWrap: true, when using Column, set its mainAxisSize: MainAxisSize.min). This is applicable to any level of the children. (e.g., Column inside Container...).

Moreover, take care when using Center widget, as that takes full space of parent and that's why it is not suggested to use.

If the PanelContent.panelContent contains more number of items, PanelSize.expandedHeight] is set to 1.0 (100% of available height).

While using this, you can not change height of the panel runtime.

Although tested, this feature can't be considered to be Super Stable. This also introduces a small processing overhead while calculating the height. When opting for production release of your app, please test the app thoroughly while using this.


PanelAutoSizing({bool headerSizeIsClosed = false, bool autoSizeCollapsed = false, bool autoSizeExpanded = false, bool useMinExpanded = false})


autoSizeCollapsed bool
If true, set panel's PanelSize.collapsedHeight to the PanelContent.collapsedWidget's height.
autoSizeExpanded bool
If true, set panel's PanelSize.expandedHeight to the PanelContent.panelContent's height.
hashCode int
The hash code for this object.
headerSizeIsClosed bool
If true and PanelContent.headerWidget is provided, set panel's PanelSize.closedHeight to the header's height.
runtimeType Type
A representation of the runtime type of the object.
useMinExpanded bool
If autoSizeExpanded is true and if you also want to take PanelSize.expandedHeight in the consideration, use this.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() String
A string representation of this object.


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