AnchorStretchSettings class

Configuration for the anchor stretch effect on interactive glass widgets.

This bundles the fine-tuning parameters for how a widget stretches when the user presses and drags — just like LiquidGlassSettings bundles glass rendering parameters.

Most developers won't need to change these — the defaults match iOS 26 button behaviour. Use this when you want to fine-tune the feel:

GlassButton(
  anchorStretchSettings: AnchorStretchSettings(
    intensity: 0.8,  // more stretchy
    bounciness: 0.2, // more elastic snap-back
  ),
)

Constructors

AnchorStretchSettings({double intensity = 0.5, double squashFactor = 0.3, double translationDamping = 0.15, double bounciness = 0.15})
Creates anchor stretch settings.
const

Properties

bounciness → double
Extra bounciness added to the release spring.
final
hashCode → int
The hash code for this object.
no setterinherited
intensity → double
How much the widget elongates in the drag direction.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
squashFactor → double
How much the perpendicular dimension compresses during stretch.
final
translationDamping → double
How far the widget's center shifts toward the finger.
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

Constants

nativeTremor → const AnchorStretchSettings
The stretch a native iOS 26 button shows on a long drag: no more than ~5 % of elongation with matching squash, a few points of travel, and no rebound of its own — the release bounce lives in the press scale.