title: Receive a map from Navigator.pop
body: <p>I have a page where user enters his username and birthday after initial sign in, then I want to return and use this data in previous screen.</p>
  
  <p>In Screen2:</p>
  
  <pre><code>Navigator.pop(context, {'username':username, 'birthday':birthday});
  </code></pre>
  
  <p>In Screen1:</p>
  
  <pre><code>final userData = await Navigator.pushNamed(context, '/setup_profile');
  </code></pre>
  
  <p>final/var works well for single variable such as String but doesn't work for maps because it doesn't know returning object is actually a map.</p>
  
  <p>Naturally you can't use <code>userData['username']</code> without specifying it is a Map and I don't understand how to specify it.</p>
  
  <p>I've tried</p>
  
  <pre><code>Map&lt;String, dynamic&gt; userData = await Navigator.pushNamed(context, '/register');
  </code></pre>
  
  <p>It didn't work I received this error:</p>
  
  <pre><code>Unhandled Exception: type 'MaterialPageRoute&lt;dynamic&gt;' is not a subtype of type 'Route&lt;Map&lt;String, dynamic&gt;&gt;'
  </code></pre>
  
  <p>Then I tried</p>
  
  <pre><code>Route route = await Navigator.pushNamed(context, '/register');
  Map&lt;String, dynamic&gt; data = route.currentResult;
  </code></pre>
  
  <p>This didn't work as well, I got same error</p>
  
  <pre><code>Unhandled Exception: type 'MaterialPageRoute&lt;dynamic&gt;' is not a subtype of type 'Route&lt;Route&lt;dynamic&gt;&gt;'
  </code></pre>
  
  <p>Simply put I want to use that returned Map in Screen1. </p>
  
  <p>Main problem is I don't know how to specify returning data, is it a custom class or map or list or something else. How can I specify return type from Navigator.pop?</p>