PresentumSlot<TItem, S, V> { final S surface; // Which surface final TItem? active; // Currently showing (or null) final List<TItem> queue; // Waiting items (FIFO)}
The queue is a FIFO (First In, First Out) list of items waiting their turn.When the active item is dismissed, the first queued item automatically becomes active:Before dismiss:
Every state change has an intention controlling history management:
enum PresentumStateIntention { auto, // Default: update history when values change replace, // Overwrite last history entry append, // Force new history entry cancel, // Abort transition}
final state = presentum.state;// All active items across surfacesfinal allActive = state.activeItems;// Active item for specific surfacefinal bannerItem = state.slots[AppSurface.homeTopBanner]?.active;// All surfaces with active itemsfinal activeSurfaces = state.activeSurfaces;
// Set active itemstate.setActive(surface, item);// With intentionstate.setActive( surface, item, intention: PresentumStateIntention.replace,);// Clear active (promotes queue)state.clearActive(surface);
final history = presentum.observer.history;// Each entry containsfor (final entry in history) { print('At ${entry.timestamp}:'); print(' Active surfaces: ${entry.state.activeSurfaces}');}
Enable time-travel debugging, analytics, or restoration after login.