core/models/layers/layer library

Classes

EmojiLayer
A class representing a layer with emoji content.
Layer
Represents a layer with common properties for widgets.
LayerAnimation
A single animation applied to a Layer on the video timeline.
LayerKeyframe
A layer's placement at one point of its time range.
LayerKeyframeEffect
A loop animation a layer plays between two of its keyframes, see LayerKeyframe.effects.
LayerPlacement
Where a layer sits, how big it is, how far it is turned and how opaque it is at one moment, measured like Layer.offset, Layer.scale, Layer.rotation and Layer.opacity.
PaintLayer
A class representing a layer with custom paint content.
TextHighlight
A part of a TextLayer's text that is highlighted while the video plays through it, such as the word of a caption that is being spoken.
TextLayer
Represents a text layer with customizable properties.
WidgetLayer
A class representing a layer with custom widget content.
WidgetLayerExportConfigs
A class that represents the export configurations for a widget layer.

Enums

AnimationCurve
Easing curve for animation timing.
AnimationPhase
Whether the animation plays at the start, end, or both ends of the layer's time range, or repeats throughout it.
LayerAnimationType
The type of animation to apply to a Layer.
SlideDirection
Slide direction for slide animations.

Constants

kDefaultTextHighlightColor → const Color
The TextLayer.highlightColor a layer gets when none is given: a warm yellow that reads on light and dark text alike.
kLayerKeyframeTolerance → const Duration
How far apart a playback position and a keyframe may be for the keyframe to count as at that position.

Functions

layerKeyframeEffects(List<LayerKeyframe> keyframes, {required Duration origin}) → List<LayerKeyframeEffect>
The LayerKeyframe.effects of keyframes, each placed on the stretch to the next keyframe with its cycle fitted to it.
layerKeyframePlacementAt(List<LayerKeyframe> keyframes, Duration time) → LayerPlacement?
The placement keyframes give a layer time after the time they are measured from (see LayerKeyframe.time), or null when there are none.
sortLayerKeyframes(Iterable<LayerKeyframe> keyframes) → List<LayerKeyframe>
keyframes sorted by LayerKeyframe.time, as a new list.

Typedefs

LayerTimelineTransitionBuilder = Widget Function(Widget child, Animation<double> animation)
Signature for a builder that wraps a layer widget with an animated transition driven by animation.