TouchToExpandContainer class

A container Widget that is maintaining a single widget child instance and expands to fill the screen when tapped

Inheritance

Constructors

TouchToExpandContainer({Key? key, required Widget child, required double width, required double height, double? expandedWidth, double? expandedHeight, Duration duration = const Duration(milliseconds: 290), Curve animationCurve = const Cubic(0.2, 0.1, 0.4, 1.0), Curve reverseAnimationCurve = const Cubic(0.45, 0, 0.75, 0), BoxDecoration? decoration, BoxDecoration? expandedDecoration, bool isOutlineDisplayed = true, Offset expandedOffset = Offset.zero, bool isLiveAlways = false, bool isHandled = false, CustomHandle? customHandlePainter, Offset handlebarOffset = Offset.zero, bool showBarrier = true, Color barrierColor = const Color.fromARGB(47, 0, 0, 0), bool isAbsolutePositioned = true, bool isScrollActivated = false})
const

Properties

animationCurve Curve
Curve for the expand animation
final
barrierColor Color
The color of the modal barrier that appears behind expanded containers
final
child Widget
The widget to display inside the container
final
customHandlePainter CustomHandle?
A drawable custom handle drawer that receives CustomPainter.paint function and Size.
final
decoration BoxDecoration?
Decoration for the container (defaults to 1.5px black border)
final
duration Duration
Duration of the expand/collapse animation
final
expandedDecoration BoxDecoration?
Decoration for the expanded container (defaults to 1.5px black border and a little shadow effect)
final
expandedHeight double?
Height when expanded (defaults to 55% of screen height)
final
expandedOffset Offset
offset to apply when expanded
final
expandedWidth double?
Width when expanded (defaults to (screenSize.width > 800 ? 700.0 : screenSize.width * 0.82))
final
handlebarOffset Offset
Offset for the handle position relative to the expanded container location
final
hashCode int
The hash code for this object.
no setterinherited
height double
height of the container
final
isAbsolutePositioned bool
Whether this container should maintain absolute position during scroll; not implemented yet in 0.1.0
final
isHandled bool
Whether to show a drag handle when expanded
final
isLiveAlways bool
Whether this container should ignore barrier effects from other containers
final
isOutlineDisplayed bool
Whether to display the container box decoration/outline in collapsed location in expanded state
final
isScrollActivated bool
Whether scrolling the background is allowed when this container is expanded
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
reverseAnimationCurve Curve
Curve for the collapse animation
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showBarrier bool
Whether to show the modal barrier when expanded
final
width double
width of the container
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<TouchToExpandContainer>
Creates the mutable state for this widget at a given location in the tree.
override
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.
inherited
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, int wrapWidth = 65}) 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