ZdsExpandable class

A component that can be collapsed and uncollapsed.

This is typically used with long Text widgets, where their length might complicate navigation.

When collapsed, the component will take the height of minHeight. If the child's height does not exceed minHeight, then no button to collapse/expand the widget will be shown.

See also:

Inheritance
Available Extensions

Constructors

ZdsExpandable({required Widget child, Key? key, String collapsedButtonText = '', String expandedButtonText = '', double minHeight = 60, Color? color})
A widget that can be collapsed and expanded.
const

Properties

child Widget
The child that will be collapsed and extended.
final
collapsedButtonText String
The text to show in the button when the child is collapsed.
final
color Color?
The color to be used for the fadeout gradient indicating the widget is collapsed.
final
expandedButtonText String
The text to show in the button when the child is expanded.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minHeight double
The child's height when it's in its collapsed state.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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