notifyStateChanged static method
Called by JController when the state changes.
Implementation
static void notifyStateChanged(JState prev, JState next, [JIntent? origin]) {
final callback = onStateChanged;
if (callback == null && _delegates.isEmpty) return;
_notify(
'state changed',
(d) => d.onStateChanged(prev, next, origin),
callback == null ? null : () => callback(prev, next, origin),
);
}