autoLogNotificationStream method

StreamSubscription<Map<String, dynamic>> autoLogNotificationStream(
  1. Stream<Map<String, dynamic>> stream, {
  2. String action = 'received',
  3. String channel = 'notifications',
})

Auto-log each received notification payload from a stream.

Implementation

StreamSubscription<Map<String, dynamic>> autoLogNotificationStream(
  Stream<Map<String, dynamic>> stream, {
  String action = 'received',
  String channel = 'notifications',
}) {
  return stream.listen((payload) {
    logNotificationEvent(
      action: action,
      channel: channel,
      payload: payload,
    );
  });
}