CollapseOnScrollActionButton class
An CustomActionButton whose label will be collapsed and expanded depending on the specified scroll controller's offset.
The icon will be displayed regardless of the current scroll offset.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CollapseOnScrollActionButton
- Implemented types
Constructors
- CollapseOnScrollActionButton({Key? key, required ScrollController scrollController, Color backgroundColor = LitColors.lightGrey, Color accentColor = LitColors.lightRed, required IconData icon, required String label, Duration collapseDuration = const Duration(milliseconds: 500), double requiredScrollOffset = 64.0, EdgeInsets padding = const EdgeInsets.symmetric(vertical: 8.0, horizontal: 22.0), required void onPressed()})
-
Creates a CollapseOnScrollActionButton.
const
Properties
- accentColor → Color
-
The button's animated accent color.
final
- backgroundColor → Color
-
The buttons background colo.
final
- collapseDuration → Duration
-
The collapse animation's duration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData
-
The button's icon displayed all the time.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
The button's label collapsed and expanded on scroll.
final
- onPressed → void Function()
-
The button's callback method.
final
- padding → EdgeInsets
-
final
- requiredScrollOffset → double
-
The scroll offset threshold required to trigger the collapse.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
The ScrollController of the widget whose scroll offset should be listened to.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _CollapseOnScrollActionButtonState -
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}) → 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