Animation constructor
Animation({
- String name = '',
- List<
AnimationChannel> ? channels,
Creates an Animation with the given name and channels.
endTime is computed as the maximum end time across all channels' PropertyResolvers.
Implementation
Animation({this.name = '', List<AnimationChannel>? channels})
: channels = channels ?? [],
_endTime =
channels?.fold<double>(0.0, (
double previousValue,
AnimationChannel element,
) {
return max(element.resolver.getEndTime(), previousValue);
}) ??
0.0;