AnimatedEffect class
A widget that animates the effects applied to it's child.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimatedEffect
- Available extensions
Constructors
- AnimatedEffect({Key? key, required Widget? child, required Duration duration, required AnimationTriggerType triggerType, AnimationStartState startState = AnimationStartState.idle, Object? trigger, Curve curve = appleEaseInOut, VoidCallback? onEnd, int repeat = 0, bool reverse = false, bool resetValues = false, bool interruptable = true, Duration delay = Duration.zero, BooleanCallback? playIf, BooleanCallback? skipIf, AnimationBehavior? animationBehavior})
-
Creates AnimatedEffect widget.
const
Properties
- animationBehavior → AnimationBehavior?
-
The behavior of the controller when
AccessibilityFeatures.disableAnimations is true.
final
- child → Widget?
-
The widget below this widget in the tree.
final
- curve → Curve
-
The curve of the animation.
final
- delay → Duration
-
A delay before the animation starts.
final
- duration → Duration
-
The duration of the animation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interruptable → bool
-
Whether the animation should be reset on subsequent triggers. If this
animation is re-triggered, it will reset the current active animation
and re-drive from the beginning.
Setting this to true will force the animation to wait for the last
animation in the chain to finish before starting.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onEnd → VoidCallback?
-
A callback that is called when the animation ends.
final
- playIf → BooleanCallback?
-
A callback that returns whether the animation should be played
or skipped. If the callback returns false, the animation will
be skipped, even when it is explicitly triggered.
final
- repeat → int
-
Determines how many times the animation should be repeated.
final
- resetValues → bool
-
Normally, an effect represents the current state of the widget and this
animate effect is only in charge of lerping between states of those
effect values.
If this is set to true, instead of treating effects as current states
to animate between, it will always animate from an initial default
state towards the current state.
final
- reverse → bool
-
Whether the animation should be reversed after each repetition.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipIf → BooleanCallback?
-
A callback that determines whether the animation should be skipped by
setting the animation value to 1, effectively skipping the animation to
the ending values.
final
- startState → AnimationStartState
-
Determines the behavior of this AnimatedEffect as soon as it is added
to the widget tree.
final
- trigger → Object?
-
The value used to trigger the animation. As long as the value of trigger
is the same, the animation will not be triggered again.
final
- triggerType → AnimationTriggerType
-
Defines how the animation is fired.
final
Methods
-
align(
AlignmentGeometry alignment, {AlignmentGeometry? from, double heightFactor = 1, double widthFactor = 1, double? fromHeightFactor, double? fromWidthFactor}) → Widget -
Available on Widget, provided by the AlignEffectExt extension
Applies an AlignEffect to a Widget with the givenalignment
. -
alignX(
double x, {double? from}) → Widget -
Available on Widget, provided by the AlignEffectExt extension
Applies an AlignEffect to a Widget only on the x-axis. -
alignXY(
double x, double y, {AlignmentGeometry? from}) → Widget -
Available on Widget, provided by the AlignEffectExt extension
Applies an AlignEffect to a Widget with the givenx
andy
values. -
alignY(
double y, {double? from}) → Widget -
Available on Widget, provided by the AlignEffectExt extension
Applies an AlignEffect to a Widget only on the y-axis. -
animate(
{required Object? trigger, Duration duration = const Duration(milliseconds: 350), Curve curve = appleEaseInOut, int repeat = 0, bool reverse = false, bool resetValues = false, bool interruptable = true, Duration delay = Duration.zero, AnimationStartState startState = AnimationStartState.idle, VoidCallback? onEnd, BooleanCallback? playIf, BooleanCallback? skipIf, AnimationBehavior? animationBehavior}) → Widget -
Available on Widget?, provided by the AnimatedEffectExt extension
Animate the effects applied to this widget. -
animateAfter(
{Duration duration = const Duration(milliseconds: 350), Curve curve = appleEaseInOut, int repeat = 0, bool reverse = false, bool resetValues = false, Duration delay = Duration.zero, AnimationStartState startState = AnimationStartState.idle, VoidCallback? onEnd, BooleanCallback? playIf, BooleanCallback? skipIf, AnimationBehavior? animationBehavior}) → Widget -
Available on Widget?, provided by the AnimatedEffectExt extension
Animate the effects applied to this widget after the last animation in the chain ends. -
blur(
double blur, {double? from}) → Widget -
Available on Widget, provided by the BlurEffectExt extension
Applies a BlurEffect to this widget with givenblur
value. -
blurIn(
{double blur = 10, double? end}) → Widget -
Available on Widget, provided by the BlurEffectExt extension
Applies a BlurEffect to this widget with a default blur in animation. -
blurOut(
{double blur = 10, double? start}) → Widget -
Available on Widget, provided by the BlurEffectExt extension
Applies a BlurEffect to this widget with a default blur out animation. -
blurX(
double blurX, {double? from}) → Widget -
Available on Widget, provided by the BlurEffectExt extension
Applies a BlurEffect to only the horizontal axis of this widget with givenblurX
value. -
blurXY(
double blurX, double blurY, {Offset? from}) → Widget -
Available on Widget, provided by the BlurEffectExt extension
Applies a BlurEffect to this widget with givenblurX
andblurY
values. -
blurY(
double blurY, {double? from}) → Widget -
Available on Widget, provided by the BlurEffectExt extension
Applies a BlurEffect to only the vertical axis of this widget with givenblurY
value. -
clip(
double radius, {Clip? clip, double? from}) → Widget -
Available on Widget, provided by the ClipEffectExtension extension
Applies an ClipEffect to a Widget with the givenclip
andradius
. -
clipCorners(
List< double> corners, {Clip? clip, List<double> ? from}) → Widget -
Available on Widget, provided by the ClipEffectExtension extension
Applies an ClipEffect to a Widget with the givenclip
and acorners
. -
clipRRect(
BorderRadius borderRadius, {Clip? clip, BorderRadius? from}) → Widget -
Available on Widget, provided by the ClipEffectExtension extension
Applies an ClipEffect to a Widget with the givenclip
and aborderRadius
. -
color(
{Color? color, BlendMode mode = BlendMode.overlay, List< double> ? matrix, Color? colorFrom, List<double> ? fromMatrix}) → Widget -
Available on Widget, provided by the ColorFilterEffectExtension extension
Applies an ColorFilterEffect to a Widget. -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AnimatedEffect> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
fade(
double opacity, {double? from}) → Widget -
Available on Widget, provided by the OpacityEffectExtension extension
Alias toopacity
. -
fadeIn(
{double start = 0, double end = 1}) → Widget -
Available on Widget, provided by the OpacityEffectExtension extension
Applies an OpacityEffect to a Widget with a default fade in animation. -
fadeOut(
{double start = 1, double end = 0}) → Widget -
Available on Widget, provided by the OpacityEffectExtension extension
Applies an OpacityEffect to a Widget with a default fade out animation. -
flashIn(
{Color color = Colors.white, BlendMode mode = BlendMode.overlay, List< double> matrix = ColorFilterMatrix.identity}) → Widget -
Available on Widget, provided by the ColorFilterEffectExtension extension
Applies an ColorFilterEffect to a Widget with a default flash in animation. -
flashOut(
{Color color = Colors.white, BlendMode mode = BlendMode.overlay, List< double> matrix = ColorFilterMatrix.identity}) → Widget -
Available on Widget, provided by the ColorFilterEffectExtension extension
Applies an ColorFilterEffect to a Widget with a default flash out animation. -
maybeOf(
BuildContext context) → EffectQuery? - Returns the animation value of the nearest EffectQuery ancestor. If there is no ancestor, it returns null.
-
modulate(
{Color? color, BlendMode mode = BlendMode.overlay, List< double> ? matrix, Color? colorFrom, List<double> ? fromMatrix}) → Widget -
Available on Widget, provided by the ColorFilterEffectExtension extension
Applies an ColorFilterEffect to a Widget. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
oneShot(
{Key? key, Duration duration = const Duration(milliseconds: 350), Curve curve = appleEaseInOut, int repeat = 0, bool reverse = false, bool resetValues = false, bool interruptable = true, Duration delay = Duration.zero, VoidCallback? onEnd, BooleanCallback? playIf, BooleanCallback? skipIf, AnimationBehavior? animationBehavior}) → AnimatedEffect -
Available on Widget?, provided by the AnimatedEffectExt extension
Animate the effects applied to this widget. -
opacity(
double opacity, {double? from}) → Widget -
Available on Widget, provided by the OpacityEffectExtension extension
Applies an OpacityEffect to a Widget. -
pad(
EdgeInsets padding, {EdgeInsets? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenpadding
. -
padAll(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenpadding
. -
padBottom(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenbottom
padding. -
padHorizontal(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenhorizontal
padding. -
padLeft(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenleft
padding. -
padOnly(
{double left = 0, double right = 0, double top = 0, double bottom = 0, double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenleft
,right
,top
, andbottom
padding. -
padRight(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenright
padding. -
padSymmetric(
{double vertical = 0, double horizontal = 0, double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenvertical
andhorizontal
padding. -
padTop(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the giventop
padding. -
padVertical(
double padding, {double? from}) → Widget -
Available on Widget, provided by the PaddingEffectExt extension
Applies an PaddingEffect to a Widget with the givenvertical
padding. -
pointerTransition(
PointerTransitionBuilder builder, {Alignment origin = Alignment.center, bool useGlobalPointer = false, bool usePointerRouter = true, bool transitionBetweenBounds = true, bool resetOnExitBounds = true, Curve curve = appleEaseInOut, Duration duration = const Duration(milliseconds: 125), Key? key, AnimationBehavior? animationBehavior}) → Widget -
Available on Widget, provided by the PointerTransitionExt extension
Applies pointer transition effects to this widget. -
resetAll(
) → Widget -
Available on Widget?, provided by the AnimatedEffectExt extension
Resets all animations in the chain by going down the children tree and resetting all animations. -
roll(
{AxisDirection slideInDirection = AxisDirection.up, AxisDirection slideOutDirection = AxisDirection.up, double multiplier = 1, bool useSnapshots = false}) → EffectWidget -
Available on Widget?, provided by the RollEffectExtension extension
Applies an RollEffect to a Widget with the givenslideInDirection
,slideOutDirection
andmultiplier
. -
rotate(
double angle, {Offset origin = Offset.zero, AlignmentGeometry alignment = Alignment.center, double? from}) → Widget -
Available on Widget, provided by the RotationEffectExt extension
Applies a RotationEffect to a Widget. -
rotateIn(
{double? from, Offset origin = Offset.zero, AlignmentGeometry alignment = Alignment.center}) → Widget -
Available on Widget, provided by the RotationEffectExt extension
Applies a RotationEffect to a Widget to rotate it in. -
rotateOut(
{double? to, Offset origin = Offset.zero, AlignmentGeometry alignment = Alignment.center}) → Widget -
Available on Widget, provided by the RotationEffectExt extension
Applies a RotationEffect to a Widget to rotate it out. -
scale(
double scale, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double? from, bool transformHitTests = true}) → Widget -
Available on Widget, provided by the ScaleEffectExt extension
Applies a ScaleEffect to a Widget with the givenscale
on both axes. -
scaleIn(
{double? start, double? end, AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, bool transformHitTests = true}) → Widget -
Available on Widget, provided by the ScaleEffectExt extension
Applies an ScaleEffect to a Widget with a default scale in animation. -
scaleOut(
{double? start, double? end, AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, bool transformHitTests = true}) → Widget -
Available on Widget, provided by the ScaleEffectExt extension
Applies an ScaleEffect to a Widget with a default scale out animation. -
scaleX(
double scaleX, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double? from, bool transformHitTests = true}) → Widget -
Available on Widget, provided by the ScaleEffectExt extension
Applies a ScaleEffect to a Widget only on the x-axis. -
scaleXY(
double scaleX, double scaleY, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, Offset? from, bool transformHitTests = true}) → Widget -
Available on Widget, provided by the ScaleEffectExt extension
Applies a ScaleEffect to a Widget with the givenscaleX
andscaleY
. -
scaleY(
double scaleY, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double? from, bool transformHitTests = true}) → Widget -
Available on Widget, provided by the ScaleEffectExt extension
Applies a ScaleEffect to a Widget only on the y-axis. -
scrollTransition(
ScrollTransitionBuilder builder) → Widget -
Available on Widget, provided by the ScrollTransitionExt extension
Applies scroll transition effects to this widget. -
shake(
{double frequency = 8, Offset offset = const Offset(5, 0), double rotation = pi / 36}) → Widget -
Available on Widget, provided by the ShakeEffectExt extension
Applies a ShakeEffect to a Widget. -
skew(
double skew, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double skewFrom = 0, AlignmentGeometry alignmentFrom = Alignment.center, Offset originFrom = Offset.zero}) → Widget -
Available on Widget, provided by the SkewEffectExt extension
Applies a SkewEffect to a Widget with the givenskew
on both axes. -
skewX(
double skewX, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double skewFrom = 0, AlignmentGeometry alignmentFrom = Alignment.center, Offset originFrom = Offset.zero}) → Widget -
Available on Widget, provided by the SkewEffectExt extension
Applies a SkewEffect to a Widget only on the x-axis. -
skewXY(
double skewX, double skewY, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double skewFromX = 0, double skewFromY = 0, AlignmentGeometry alignmentFrom = Alignment.center, Offset originFrom = Offset.zero}) → Widget -
Available on Widget, provided by the SkewEffectExt extension
Applies a SkewEffect to a Widget with the givenskewX
andskewY
. -
skewY(
double skewY, {AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero, double skewFrom = 0, AlignmentGeometry alignmentFrom = Alignment.center, Offset originFrom = Offset.zero}) → Widget -
Available on Widget, provided by the SkewEffectExt extension
Applies a SkewEffect to a Widget only on the y-axis. -
slideIn(
Offset offset, {bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in. -
slideInFromBottom(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in from the bottom. -
slideInFromLeft(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in from the right. -
slideInFromRight(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in from the right. -
slideInFromTop(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in from the top. -
slideInHorizontally(
double x, {bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in. -
slideInVertically(
double y, {bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget in. -
slideOut(
Offset offset, {bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out. -
slideOutHorizontally(
double x, {bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out. -
slideOutToBottom(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out to the bottom. -
slideOutToLeft(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out to the left. -
slideOutToRight(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out to the right. -
slideOutToTop(
{double? value, bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out to the top. -
slideOutVertically(
double y, {bool fractional = false, bool transformHitTests = false}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with a default animation to slide this widget out. -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
transform(
{double translateX = 0, double translateY = 0, double translateZ = 0, double rotateX = 0, double rotateY = 0, double rotateZ = 0, double scaleX = 1, double scaleY = 1, double scaleZ = 1, double depth = 0, AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero}) → Widget -
Available on Widget, provided by the TransformEffectExt extension
Applies a TransformEffect to a Widget. -
translate(
Offset offset, {bool fractional = false, bool transformHitTests = false, Offset? from}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with the givenoffset
.fractional
determines whether theoffset
moves the Widget by using its own size as a percentage or by a fixed amount. -
translateX(
double x, {bool fractional = false, bool transformHitTests = false, double? from}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget only on the x-axis.fractional
determines whether theoffset
moves the Widget by using its own size as a percentage or by a fixed amount. -
translateXY(
double x, double y, {bool fractional = false, bool transformHitTests = false, Offset? from}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget with the givenx
andy
values.fractional
determines whether theoffset
moves the Widget by using its own size as a percentage or by a fixed amount. -
translateY(
double y, {bool fractional = false, bool transformHitTests = false, double? from}) → Widget -
Available on Widget, provided by the TranslateEffectExt extension
Applies a TranslateEffect to a Widget only on the y-axis.fractional
determines whether theoffset
moves the Widget by using its own size as a percentage or by a fixed amount.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited