Answers for "hero animation for page navigation in flutter example"

0

hero animation for page navigation in flutter example

Navigator.of(context).push(
                      PageRouteBuilder(
                        transitionDuration: Duration(milliseconds: 1000),
                        pageBuilder: (BuildContext context,
                            Animation<double> animation,
                            Animation<double> secondaryAnimation) {
                          return NewPage();
                        },
                        transitionsBuilder: (BuildContext context,
                            Animation<double> animation,
                            Animation<double> secondaryAnimation,
                            Widget child) {
                          return Align(
                            child: FadeTransition(
                              opacity: animation,
                              child: child,
                            ),
                          );
                        },
                      ),
                    );
Posted by: Guest on June-02-2021

Code answers related to "hero animation for page navigation in flutter example"

Code answers related to "Dart"

Browse Popular Code Answers by Language