ScrollWrapper class
Wrap the widget to show a scroll to top prompt over when a certain scroll offset is reached.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ScrollWrapper
Constructors
- ScrollWrapper({Key? key, required ScrollController scrollController, double promptScrollOffset = 200, required Widget child, Curve scrollToTopCurve = Curves.fastOutSlowIn, Duration scrollToTopDuration = const Duration(milliseconds: 500), Duration promptDuration = const Duration(milliseconds: 500), Curve promptAnimationCurve = Curves.fastOutSlowIn, Alignment promptAlignment = Alignment.topRight, PromptButtonTheme? promptTheme, PromptAnimation promptAnimationType = PromptAnimation.size, ReplacementBuilder? promptReplacementBuilder})
Properties
- child → Widget
-
The widget to show the prompt over when scroll is at an offset.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- promptAlignment → Alignment
-
Where on the widget to align the prompt.
final
- promptAnimationCurve → Curve
-
Animation Curve that the prompt will follow when coming into view.
final
- promptAnimationType → PromptAnimation
-
PromptAnimation type that the prompt will follow when coming into view.
Default is PromptAnimation.size.
final
- promptDuration → Duration
-
Duration it takes for the prompt to come into view/vanish.
final
- promptReplacementBuilder → ReplacementBuilder?
-
Replace the prompt button with your own custom widget. Returns the
BuildContext and the Function to call to scroll to top.
final
- promptScrollOffset → double
-
At what scroll offset to show the prompt on.
final
- promptTheme → PromptButtonTheme?
-
Modify the prompt theme by providing a custom PromptButtonTheme.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
ScrollController of the scrollable widget to scroll to the top of when
the prompt is pressed.
final
- scrollToTopCurve → Curve
-
Animation Curve for scrolling to the top.
final
- scrollToTopDuration → Duration
-
Duration it takes for the page to scroll to the top on prompt button press.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ScrollWrapperState -
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