Effect class abstract

An Effect that can be applied to a Widget. This is the base class for all effects.

Effects define how a Widget should be transformed. For example, a ScaleEffect defines how a Widget should be scaled.

AnimatableEffect takes an Effect and applies it to a Widget.

An effect can be animated by parent AnimatedEffect or ScrollTransition. An animation value is passed to Effect.lerp method. This value is interpolated by the parent AnimatedEffect or ScrollTransition depending on the Curve provided to them.

If no parent AnimatedEffect or ScrollTransition is provided, the animation value is 0.

Implementers

Constructors

Effect()
Creates an Effect.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

apply(BuildContext context, Widget child) Widget
Applies this Effect to given child. This is called by Effect builder widgets to apply the effect to given child.
lerp(covariant Effect other, double value) Effect
Linearly interpolates between two Effects. This is used to animate between two Effects. The value argument is a fraction that determines the position of this effect between this and other.
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