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}) {
final curve = Curves.easeInOut;
return {
"scale": TweenList<double>(
[
TweenPercentage(percent: 0, value: 1.0, curve: curve),
TweenPercentage(
percent: 14,
value: 1.0 + 0.3 * preferences.magnitude,
curve: curve),
TweenPercentage(percent: 28, value: 1.0, curve: curve),
TweenPercentage(
percent: 42,
value: 1.0 + 0.3 * preferences.magnitude,
curve: curve),
TweenPercentage(percent: 70, value: 1.0, curve: curve),
],
),
};
}