PanelAutoSizing class

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.

Constructors

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

Properties

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

Methods

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

Operators

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