title: Bug Null check operator used on a null value in flutter
body: <p>I have a specialDialog in dart that when clicking on the FlatButton displays an error message in the emulator &quot;The relevant error-causing widget was
  ScheduleReturn&quot;</p>
  <pre><code>  specialDialog(BuildContext context, String? agent_id) {
  // set up the buttons
  Widget coverageButton = FlatButton(
    child: Text(&quot;Solicitar cobertura&quot;),
    onPressed: () {
      localRequestCoverage(agent_id);
    },
  );
  Widget returnButton = FlatButton(
    child: Text(&quot;Solicitar devolución&quot;),
    onPressed: () {
      Route route = MaterialPageRoute(
          builder: (context) =&gt; ScheduleReturn(schedule: widget.schedule));
      Navigator.pushReplacement(context, route);
    },
  );
  </code></pre>