FlipEffect class
Effect that creates a 2.5D card flip rotation effect (via a matrix Transform). The effect can be horizontal or vertical.
The begin / end values represent the number of "flips" (ie. half turns,
180deg or Pi radians) from nominal. For example, 0.5
would be a 90 degree
rotation (half a "flip").
alignment lets you set the origin of the rotation (ie. the point around which the rotation will occur). For example an alignment of Alignment.topCenter would rotate around the top of the child on a vertical flip. Default is Alignment.center.
perspective lets you adjust the focal length for the 2.5D effect. A higher number
increases perspective transform (ie. reduces focal length). Default is 1
.
direction indicates the direction of the flip. For example Axis.horizontal would cause it to rotate around the Y axis — flipping horizontally. Default is Axis.vertical.
Constructors
Properties
- alignment → Alignment
-
final
- begin → double?
-
The begin value for the effect. If null, effects should use a reasonable
default value when appropriate.
finalinherited
- curve → Curve?
-
The specified curve for the effect. If null, will use the curve from the
previous effect, or Animate.defaultCurve if this is the first effect.
finalinherited
- delay → Duration?
-
The specified delay for the effect. If null, will use the delay from the
previous effect, or Duration.zero if this is the first effect.
finalinherited
- direction → Axis
-
final
- duration → Duration?
-
The specified duration for the effect. If null, will use the duration from the
previous effect, or Animate.defaultDuration if this is the first effect.
finalinherited
- end → double?
-
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
- perspective → double
-
final
- 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 necessary to implement the effect, based on the
provided AnimationController and EffectEntry.
override
-
buildAnimation(
AnimationController controller, EffectEntry entry) → Animation< double> -
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
- defaultAxis → const Axis
- defaultPerspective → const double
- defaultValue → const double
- neutralValue → const double