EffectDefinition class final
Describes one kind of effect: where it plays, how it paints and how it presents the element itself.
Register custom definitions through a Flutter extension's effects
contribution. paint runs every frame while the effect plays and must not
change the document.
Constructors
-
EffectDefinition({required EffectKind kind, required String label, required EffectPlacement placement, EffectPaint? paint, EffectPresent? present, bool animated = true, bool holds = false, EffectEditing editing = const EffectEditing(), Set<
EffectProperty> properties = const {}})
Properties
- animated → bool
-
Whether the effect changes over time. Effects that only change when they
are updated set this to false, so the canvas does not tick frames for
them.
final
- editing → EffectEditing
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- holds → bool
-
Whether the effect plays once over its period and then holds its last
frame until stopped, like a fade, instead of cycling.
final
- kind → EffectKind
-
final
- label → String
-
final
- paint → EffectPaint?
-
Draws the effect over the canvas content, in world coordinates.
final
- placement → EffectPlacement
-
Along a connector, inside or around a shape, or on either.
final
- playsOnConnectors → bool
-
Whether the effect can play along a connector.
no setter
- playsOnShapes → bool
-
Whether the effect can play on a shape.
no setter
- present → EffectPresent?
-
Scales or fades the element's own rendering.
final
-
properties
→ Set<
EffectProperty> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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