[flutter] Properly invoke track entry listeners, closes #2349

This commit is contained in:
Mario Zechner 2023-12-11 14:24:54 +01:00
parent 49f3e6c542
commit 73d892740d
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# 4.1.12 # 4.1.12
# FilterQuality for texture atlas pages is now set to medium. It is configurable via `Atlas.filterQuality`. See https://github.com/EsotericSoftware/spine-runtimes/issues/2362 # FilterQuality for texture atlas pages is now set to medium. It is configurable via `Atlas.filterQuality`. See https://github.com/EsotericSoftware/spine-runtimes/issues/2362
# Track Entry listeners are now invoked properly, see https://github.com/EsotericSoftware/spine-runtimes/issues/2349
# 4.1.11 # 4.1.11
# Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431 # Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431

View File

@ -3707,7 +3707,7 @@ class AnimationState {
final nativeEvent = _bindings.spine_animation_state_events_get_event(_events, i); final nativeEvent = _bindings.spine_animation_state_events_get_event(_events, i);
final event = nativeEvent.address == nullptr.address ? null : Event._(nativeEvent); final event = nativeEvent.address == nullptr.address ? null : Event._(nativeEvent);
if (_trackEntryListeners.containsKey(nativeEntry)) { if (_trackEntryListeners.containsKey(nativeEntry)) {
_trackEntryListeners[entry]?.call(type, entry, event); _trackEntryListeners[nativeEntry]?.call(type, entry, event);
} }
if (_stateListener != null) { if (_stateListener != null) {
_stateListener?.call(type, entry, event); _stateListener?.call(type, entry, event);