title: Awesome_Notifications - Bad state: Stream has already been listened to
body: <p>I am using this <a href="https://pub.dev/packages/awesome_notifications" rel="noreferrer">flutter library</a> to handle notifications. In the <code>initState()</code> in my <code>HomeView</code> I initialize this listener:</p>
  <pre><code>_notificationsActionStreamSubscription = AwesomeNotifications().actionStream.listen((receivedNotification) {
    print(&quot;user tapped on notification &quot; + receivedNotification.id.toString());
  });
  </code></pre>
  <p>Later when someone logs in or signs out of my app I call these lines:</p>
  <pre><code>Navigator.of(context).popUntil((route) =&gt; route.isFirst);
  Navigator.pushReplacement(context, MaterialPageRoute(builder: (_) =&gt; HomeView()));
  </code></pre>
  <p>This let's the <code>initState()</code> of my <code>HomeView</code> be called again which results in the error:</p>
  <pre><code>Bad state: Stream has already been listened to.
  </code></pre>
  <p>That is why I did this before calling the two Navigator lines from above, but without success:</p>
  <pre><code>AwesomeNotifications().createdSink.close();
  _notificationsActionStreamSubscription.cancel();
  </code></pre>
  <p>What am I doing wrong? I cancel the streamsubscription so why do I still get this error message?</p>
  <p>Thanks for your advice!</p>