title: How to send data back and navigate to a specific screen? [Flutter]
body: <p>I have a calendar widget which selects a date in the form of <code>DateTime</code>. I want to send this value using <code>Navigator.pop</code> but i also want to use a <code>MaterialPageRoute</code> which sends the user back to a page. I cannot use <code>Navigator.pop</code> this way :</p>
  
  <pre><code>   onPressed: () async{
                DateTime send = date;
                Navigator.pop(context, MaterialPageRoute(
                builder: (context) =&gt; DayPageViewExample(date),
               )
           );
     },
  </code></pre>
  
  <p>because the user will be navigating to the calendar screen in this flow : initial screen => second screen => calendar screen. and the selected date in the calendar must be sent back to the initial screen. </p>
  
  <p>I essentially want something like this: </p>
  
  <pre><code> onPressed: () async{
        DateTime send = date;
        Navigator.pop(context, send);
      },
  </code></pre>
  
  <p>but i want to send the <code>DateTime send</code> as a parameter to <code>MaterialPageRoute</code>. </p>
  
  <p>Could i get some suggestion on how to refactor the <code>Navigator.pop</code> so that i can send a parameter back using <code>MaterialPageRoute</code>?</p>