iterate method

  1. @override
Stream<AtNotification> iterate()
override

Iterate every notification entry. Used by the persistence migrator to copy notification content from one backend to another.

Implementation

@override
Stream<AtNotification> iterate() async* {
  // The notification keystore is backed by a LazyBox, so we can't
  // synchronously `box.get(key)` — use the Hive base's `getValue`,
  // which awaits the lazy fetch.
  for (final key in _getBox().keys) {
    final entry = await getValue(key);
    if (entry != null) yield entry;
  }
}