AnimationPadding class

Pads the animation using value.clamp

Useful for preventing the sheet from speeding off screen or out of it's parent widget, without compromising too much on bounciness.

NOTE: the top padding value is interpeted as a distance from the top. If you want to specify a range, use the .fromPercentageRange constructor

Constructors

AnimationPadding({AnimationControllerValue? top, required AnimationControllerValue bottom})
AnimationPadding.all(AnimationControllerValue value)
AnimationPadding.bottomOnly()
No padding. Allows the bottom sheet to be flung off the top of the screen, but not the bottom (old default behavior).
factory
AnimationPadding.contain()
Contain the animation within the enclosing widget (default)
factory
AnimationPadding.fromPercentageRange(double bottom, double top)
Pad with percent-distances from the bottom of the viewport
AnimationPadding.fromPercentages({double? top, double bottom = 0})
Pad with percent-distances from the top and bottom of the viewport
AnimationPadding.fromPixels({double? top, double? bottom})

Properties

bottom AnimationControllerValue
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top AnimationControllerValue?
getter/setter pair

Methods

apply(double value) double
Apply the padding to a controller value
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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