GlassTabBarScrollSample class

A single sample of a scroll view's state, fed to GlassTabBarMinimizeController.handleSample.

Exists so the minimize decision can be driven from synthetic values in tests, without a live ScrollPosition.

Annotations

Constructors

GlassTabBarScrollSample({required double pixels, required double minScrollExtent, required double maxScrollExtent, required double viewportDimension, required ScrollDirection direction, required bool outOfRange})
Creates a scroll sample.
const
GlassTabBarScrollSample.fromPosition(ScrollPosition position)
Reads the sample from a live scroll position.

Properties

direction → ScrollDirection
The direction the user is scrolling in.
final
hashCode → int
The hash code for this object.
no setterinherited
maxScrollExtent → double
Offset of the end of the content.
final
minScrollExtent → double
Offset of the start of the content.
final
outOfRange → bool
Whether the offset is currently outside the content range (rubber-band).
final
pixels → double
Current scroll offset.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
viewportDimension → double
Height of the viewport, used to recognise teleports.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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