A widget that controls whether viewport descendants will overscroll their contents. Overscrolling is clamped at the beginning or end or both according to the edge parameter.
Scroll offset limits are defined by the enclosing Scrollable's ScrollBehavior.
- Inheritance
- Object
- Widget
- ProxyWidget
- InheritedWidget
- ClampOverscrolls
Static Methods
-
of(
BuildContext context) → ClampOverscrolls -
The closest instance of this class that encloses the given context.
Constructors
- ClampOverscrolls({Key key, ScrollableEdge edge: ScrollableEdge.none, @required Widget child })
-
Creates a widget that controls whether viewport descendants will overscroll their contents.
- ClampOverscrolls.inherit({Key key, @required BuildContext context, @required ScrollableEdge edge: ScrollableEdge.none, @required Widget child })
-
Creates a widget that controls whether viewport descendants will overscroll based on the given
edge
and the inherited ClampOverscrolls widget for the givencontext
. For example if edge is ScrollableEdge.leading and a ClampOverscrolls ancestor exists that specified ScrollableEdge.trailing, then this widget would clamp both scrollable edges.factory
Properties
- edge → ScrollableEdge
-
Defines when viewport scrollOffsets are clamped in terms of the scrollDirection. If edge is
leading
the viewport's scrollOffset will be clamped at its minimum value (often 0.0). If edge istrailing
then the scrollOffset will be clamped to its maximum value. If edge isboth
then both the leading and trailing constraints are applied.read-only - child → Widget
-
The widget below this widget in the tree.
read-only, inherited - hashCode → int
-
Get a hash code for this object.
read-only, inherited - key → Key
-
Controls how one widget replaces another widget in the tree.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
clampScrollOffset(
ScrollableState scrollable, [ double newScrollOffset ]) → double -
Return the
newScrollOffset
clamped according to edge andscrollable
's scroll behavior. The value ofnewScrollOffset
defaults toscrollable.scrollOffset
. -
debugFillDescription(
List<String> description) → void -
Add additional information to the given description for use by
toString
. -
updateShouldNotify(
ClampOverscrolls old) → bool -
Whether the framework should notify widgets that inherit from this widget.
-
createElement(
) → InheritedElement -
Inflates this configuration to a concrete instance.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited -
toStringShort(
) → String -
A short, textual description of this widget.
inherited