title: "type 'Null' is not a subtype of type 'String' in type cast" error in ModalRoute.of(context).settings
body: <p>I'm trying to pass an argument through Navigator like this:</p>
  <pre><code>    Navigator.of(context).pushNamed(EditProductScreen.routeName, arguments: id);
  </code></pre>
  <p>But when trying to retrieve it using <code>final productId = ModalRoute.of(context)?.settings.arguments as String;</code>
  I'm getting this error: <strong>type 'Null' is not a subtype of type 'String' in type cast</strong>.
  I've also tried using the bang <code>!</code> operator but with no luck.</p>