FlexibleResizablePaneController class
Controller for resizable panes with flexible (proportional) sizing.
Manages a panel whose size is specified as a flex factor relative to the total available space. Similar to Flutter's Flexible widget concept.
Example:
final controller = FlexibleResizablePaneController(1.0);
ResizablePane(
controller: controller,
child: Container(color: Colors.red),
)
- Inheritance
-
- Object
- ChangeNotifier
- FlexibleResizablePaneController
- Mixed-in types
Constructors
- FlexibleResizablePaneController(double _flex, {bool collapsed = false})
- Creates a FlexibleResizablePaneController.
Properties
- collapsed → bool
-
Whether the panel is currently collapsed.
no setteroverride
- flex ← double
-
no getter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → double
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
no setteroverride
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
collapse(
) → void -
Collapses the panel to its minimum size.
override
-
computeSize(
double paneSize, {double? minSize, double? maxSize}) → double -
Computes the actual size based on
paneSizeand optional constraints.override -
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
expand(
) → void -
Expands the panel to its maximum or default size.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
resize(
double newSize, double paneSize, {double? minSize, double? maxSize}) → void -
Resizes the controller to the given
newSizewithin thepaneSizebounds.override -
toString(
) → String -
A string representation of this object.
inherited
-
tryCollapse(
[PanelSibling direction = PanelSibling.both]) → bool -
Attempts to collapse the panel in the specified
direction.inherited -
tryExpand(
[PanelSibling direction = PanelSibling.both]) → bool -
Attempts to expand the panel in the specified
direction.inherited -
tryExpandSize(
double size, [PanelSibling direction = PanelSibling.both]) → bool -
Attempts to expand by
sizepixels in the specifieddirection.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited