Navigator pass arguments with pushNamed : <p>Might have been asked before but I can't find it but how do you pass a arguments to a named route?</p>

<p>This is how I build my routes</p>

<pre><code>Widget build(BuildContext context) {
    return new Navigator(
      initialRoute: 'home/chooseroom',
      onGenerateRoute: (RouteSettings settings) {
        WidgetBuilder builder;
        switch (settings.name) {
          case 'home/chooseroom':
            // navigates to 'signup/choose_credentials'.
            builder = (BuildContext _) =&gt; new ChoosePage();
            break;
          case 'home/createpage':
            builder = (BuildContext _) =&gt; new CreateRoomPage();
            break;
          case 'home/presentation':
            builder = (BuildContext _) =&gt; new Presentation();
            break;
          default:
            throw new Exception('Invalid route: ${settings.name}');
        }
        return new MaterialPageRoute(builder: builder, settings: settings);
      },
    );
</code></pre>

<p>This is how you call it
<code>Navigator.of(context).pushNamed('home/presentation')</code></p>

<p>But what if my widget is <code>new Presentation(arg1, arg2, arg3)</code>?</p>
