title: Flutter Navigator, Horizontal Transiation with PageRoutebuilder
body: <p>I'm trying to force a <strong>horizontal Transiation</strong> in the Flutter Navigator Widget.  Navigator uses the platform Default Transition from one screen to the next.  In iOS, the transition is Right to left. Pops Left to Right.  In Android it is Bottom to Top. I believe solution is to use a <strong>PageRouteBuilder</strong>, but no luck getting it to work.  I <strong>marked the method</strong> with the Navigator Widget that I'd like to modify with a PageRouteBuilder to get desired Horizontal transition.</p>
  
  <p>Code Snippet 2, is the Transition code I have been trying to make work with no luck.</p>
  
  <hr>
  
  <h2>This code works as default transition.</h2>
  
  <pre><code>import 'package:flutter/material.dart';
  void main() =&gt; runApp(new MyApp());
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'Flutter Demo',
        theme: new ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: new MyHomePage(title: 'Flutter Demo Home Page'),
        initialRoute: "/",
        routes: {
          '/Second': (context) =&gt; SecondScreen(),
        },
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
    final String title;
    @override
    _MyHomePageState createState() =&gt; new _MyHomePageState();
  }
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),
        ),
        body: new Center(
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              ButtonMaterial02(),
              new Text('NAV DEMO...',),
              new Text('How do I get a Horizontal Transition in Android?',),
            ],
          ),
        ),
   // This trailing comma makes auto-formatting nicer for build methods.
      );
    }
  
  //================================================================
  //================================================================
    Padding ButtonMaterial02() {
      return Padding(
              padding: const EdgeInsets.all(18.0),
              child: new MaterialButton(
                onPressed: MatButton02_onPress,
                child: new Text("Material Button 02"),
                padding: EdgeInsets.all(50.0),
                minWidth: double.infinity,
                color: Theme.of(context).primaryColor,
              ),
            );
    }
  
    //  add Horizontal code here
    void MatButton02_onPress() {
                print(" MaterialButton02 onPressed...");
                Navigator.pushNamed(context, '/Second');
      //*************************************************
      //*************************************************
      //  HOW do I replace the Navigator above to use
      //  PageRouteBuilder so I can force ANDROID to
      //  Transition Right to Left instead of BottomToTop?
      //*************************************************
      //*************************************************
              }
  }
  
  //================================================================
  //================================================================
  class SecondScreen extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return Scaffold(
        appBar: AppBar(
          title: Text("Second Screen"),
        ),
        body: Center(
          child: RaisedButton(
            child: new Text("RETURN"),
            onPressed: (){
              Navigator.pop(context);
            },
          ),
        ),
      );
    }
  }
  //================================================================
  //================================================================
  </code></pre>
  
  <hr>
  
  <h2>Code Snippet 2...  transition code I have been trying to use.</h2>
  
  <pre><code>  transitionsBuilder: (
        BuildContext context, 
        Animation&lt;double&gt; animation,
        Animation&lt;double&gt; secondaryAnimation, 
        Widget child) {
          return SlideTransition(
            position: new Tween&lt;Offset&gt;(
            begin: const Offset(1.0, 0.0),
            end: Offset.zero,
           ).animate(animation),
          child: new SlideTransition(
          position: new Tween&lt;Offset&gt;(
            begin: Offset.zero,
            end: const Offset(1.0, 0.0),
          ).animate(secondaryAnimation),
          child: child,
        ),
      );
    },
  );
  Navigator.of(context).push('Second');
  </code></pre>