BoxShadowEffect class

An effect that animates a BoxShadow between begin and end (via DecoratedBox). A value of null for either will be interpreted as a shadow that matches the other shadow but with a zero offset and blurRadius. You can also specify a borderRadius that defines rounded corners for the shadow. Defaults to begin=null, end=BoxShadow(color: Color(0x80000000), blurRadius: 8.0, offset: Offset(0.0, 4.0))

This can also be used for glow effects (by setting a 0 offset, and a color).

See also: ElevationEffect for simpler animated shadows based on elevation.

Inheritance
Annotations

Constructors

BoxShadowEffect({Duration? delay, Duration? duration, Curve? curve, BoxShadow? begin, BoxShadow? end, BorderRadius? borderRadius})
const

Properties

begin → BoxShadow?
The begin value for the effect. If null, effects should use a reasonable default value when appropriate.
finalinherited
borderRadius → BorderRadius?
final
curve → Curve?
The specified easing curve for the effect. If null, will inherit the curve from the previous effect, or use Animate.defaultCurve if this is the first effect.
finalinherited
delay → Duration?
The specified delay for the effect. If null, will inherit the delay from the previous effect, or use Duration.zero if this is the first effect.
finalinherited
duration → Duration?
The specified duration for the effect. If null, will inherit the duration from the previous effect, or use Animate.defaultDuration if this is the first effect.
finalinherited
end → BoxShadow?
The end value for the effect. If null, effects should use a reasonable default value when appropriate.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, Widget child, AnimationController controller, EffectEntry entry) → Widget
Builds the widgets that implement the effect on the target child, based on the provided AnimationController and EffectEntry.
override
buildAnimation(AnimationController controller, EffectEntry entry) → Animation<BoxShadow>
Returns an animation based on the controller, entry, and begin/end values.
inherited
getBeginRatio(AnimationController controller, EffectEntry entry) → double
Returns a ratio corresponding to the beginning of the specified entry.
inherited
getEndRatio(AnimationController controller, EffectEntry entry) → double
Returns a ratio corresponding to the end of the specified entry.
inherited
getOptimizedBuilder<U>({required ValueListenable<U> animation, Widget? child, required TransitionBuilder builder}) → AnimatedBuilder
Returns an optimized AnimatedBuilder that doesn't rebuild if the value hasn't changed.
inherited
getToggleBuilder({required ValueListenable<double> animation, required Widget child, required bool toggle(), required ToggleEffectBuilder builder}) → AnimatedBuilder
Returns an AnimatedBuilder that rebuilds when the boolean value returned by the toggle function changes.
inherited
isAnimationActive(Animation animation) → bool
Check if the animation is currently running / active.
inherited
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

defaultValue → const BoxShadow
neutralValue → const BoxShadow?