DispatchSettings.persistent constructor
const
DispatchSettings.persistent({
- Duration dequeueInterval = defaultDequeueInterval,
- PersistenceFilter onLoad = whereNotOlderThanADay,
Uses a persistent dispatch queue.
This means that if the app terminates while there are still undispatched actions, those actions are dispatched on next app launch.
The onLoad
can be used to filter the stored actions and drop outdated
ones. By default, only actions that are younger then a day are retained.
See PersistenceFilter for some build in filters.
Implementation
const DispatchSettings.persistent({
Duration dequeueInterval = defaultDequeueInterval,
PersistenceFilter onLoad = whereNotOlderThanADay,
}) : this._(
dequeueInterval,
true,
onLoad,
);