getDefinition method
AnimatorWidget calls getDefinition to gather the animation. Animations are defined using named TweenLists using a Map<String, TweenList>. Example: @override Map<String, TweenList> getDefinition({Size screenSize, Size widgetSize}) { return { "opacity": TweenList
Implementation
@override
Map<String, TweenList> getDefinition({Size? screenSize, Size? widgetSize}) {
return {
"opacity": TweenList<double>(
[
TweenPercentage(percent: 0, value: 0.0, curve: Curves.easeIn),
TweenPercentage(percent: 60, value: 1.0),
],
),
"rotateY": TweenList<double>(
[
TweenPercentage(
percent: 0, value: 90.0 * toRad, curve: Curves.easeIn),
TweenPercentage(
percent: 40, value: -20.0 * toRad, curve: Curves.easeIn),
TweenPercentage(percent: 60, value: 10.0 * toRad),
TweenPercentage(percent: 80, value: -5.0 * toRad),
TweenPercentage(percent: 100, value: 0.0),
],
),
};
}