how do I add custom transitions to my flutter route in my flutter app

Question

how do I add custom transitions to my flutter route. This is my current route structure

class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
        return new MaterialApp(
            title: 'Yaip',
            theme: new ThemeData(
                primarySwatch: Colors.pink,
                brightness: Brightness.light
            ),
            home: new VerifyPhoneNumber(),
            routes: <String, WidgetBuilder>{
                '/verified': (BuildContext context) =>  new MobileNumberVerified(),
                '/setupprofile': (BuildContext context) =>  new SetUpProfile()
            },
        );
    }
}

Show source
| dart   | routes   | flutter   | transitions   2017-09-05 21:09 1 Answers

Answers to how do I add custom transitions to my flutter route in my flutter app ( 1 )

  1. 2017-09-06 05:09

    You can subclass MaterialPageRoute and override buildTransitions. Check out this Stack Overflow answer for example code.

Leave a reply to - how do I add custom transitions to my flutter route in my flutter app

◀ Go back