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 {
"translateX": TweenList<double>(
[
TweenPercentage(percent: 0, value: -screenSize!.width),
TweenPercentage(percent: 100, value: 0.0),
],
),
};
}