AnimationComponent class
Defines builder that returns a Widget acts as a container that is capable of animation.
Additionally, this Component is responsible for enforcing the menu constraints, pre-calculated constraints by MenuPositionAndSizeComponent are passed as AnimationComponentData.constraints.
Implicit animations work well. However, explicit animation might require
this component to be extended so that more instance variables can be introduced.
For instance, you might want to store an AnimationController
as an instance
variable.
Example
AnimationComponent(
builder: (AnimationComponentData data)
{
return Opacity(
opacity: data.menuState == MenuAnimationState.OpeningEnd ? 1.0 : 0.0,
child: data.child,
);
}
);
A series of detailed examples are available here.
See ComponentsConfiguration for more details.
See Also:
- Implementers
Constructors
- AnimationComponent({AnimationBuilder? builder})
- See AnimationBuilder.
Properties
- builder ↔ AnimationBuilder?
-
A builder method to create the animating Widget.
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
Methods
-
build(
AnimationComponentData data) → Widget - The method uses the AnimationComponent.builder method to actually build the Widget.
-
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