reportKeyedCallbacks method
void
reportKeyedCallbacks(})
Implementation
void reportKeyedCallbacks(
double secondsFrom,
double secondsTo, {
required KeyedCallbackReporter reporter,
int speedDirection = 1,
bool fromPong = false,
}) {
// We have to account for the state machine speed multiplier and the speed
double startingTime =
((speed * speedDirection) >= 0) ? startSeconds : endSeconds;
bool isAtStartFrame = startingTime == secondsFrom;
// Do not report a callback twice if it comes from the "pong" part of a
// "ping pong" loop
if (!isAtStartFrame || !fromPong) {
for (final keyedObject in _keyedObjects.values) {
keyedObject.reportKeyedCallbacks(
secondsFrom,
secondsTo,
reporter: reporter,
isAtStartFrame: isAtStartFrame,
);
}
}
}