SnapComponent class abstract
Abstract base class for snap components, providing a contract for calculating the size of components within a snapping behavior.
Constructors
- SnapComponent()
-
const
- SnapComponent.fraction({required Components component, required double fraction})
-
Factory constructor to create a SnapComponentAtFraction, which stops at a specific fraction position.
constfactory
- SnapComponent.fractionOffset({required Components component, double fraction, double size})
-
Factory constructor to create a SnapComponentWithOffsetFraction, which combines a size multiplier
and an fraction relative to the viewport.
constfactory
- SnapComponent.map(SnapComponent component, {required OffsetMap map})
-
Factory constructor to create a SnapComponentMap, which applies a mapping function to another SnapComponent.
constfactory
- SnapComponent.merge({required SnapComponent a, required SnapComponent b, required OffsetMerge merge})
-
Factory constructor to create a SnapComponentMerge, which merges the sizes of two components.
constfactory
- SnapComponent.offset({required Components component, double offset, double size})
-
Factory constructor to create a SnapComponentWithOffset with a component, size, and offset.
constfactory
- SnapComponent.position({required Components component, required double position})
-
Factory constructor to create a SnapComponentAtPosition, which stops at a specific pixel position.
constfactory
- SnapComponent.size({required Components component, double size})
-
Factory constructor to create a SnapComponentSize with the specified component and size.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getComponentOffsetFromTop<
T> (MultiStateSheetExtent< T> extent, Components component) → double - Gets the offset of the specified component from the top of viewport.
-
getComponentSize<
T> (MultiStateSheetExtent< T> extent, Components component) → double - Gets the base size of the specified component relative to the extent's initial configuration.
-
getSize<
T> (MultiStateSheetExtent< T> extent) → double - Calculates the size of the snap component relative to the provided extent.
-
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