nylo-core / nylo

Nylo is the fastest way to build your next Flutter mobile app. Streamline your projects with Nylo's opinionated approach to building Flutter apps. Develop your next idea ⚡️

Home Page:https://nylo.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rightToLeftJoined transition animation error

a0v0 opened this issue · comments

commented

My routes

appRouter() => nyRoutes((router) {
      // Home page
      router.route(
          RouterPages.homePage, (context) => MyHomePage(title: "Hello World"));

      // Auth routes
      router.route(RouterPages.startPage, (context) => StartPage(),
          transition: PageTransitionType.fade);
      router.route(
        RouterPages.loginByEmailPage,
        (context) => LoginByEmailPage(),
        transition: PageTransitionType.rightToLeftJoined,
      );
    });

// ignore: avoid_classes_with_only_static_members
/// Class holding all the routes
class RouterPages {
  /// Home page
  static String homePage = "/";

  /// Start page shown before login screen
  static String startPage = "/auth/start";

  /// Login by email page
  static String loginByEmailPage = "/auth/login_by_email";
}

getting this error
image

Hi @a0v0,

Hope all is well.

You need to pass in a childCurrent.
Check out the below example to see how you can achieve this.

router.route("/my-route", (context) => MyPage(),
          transition: PageTransitionType.rightToLeftJoined, 
          pageTransitionSettings: PageTransitionSettings(
                childCurrent: MyCurrentChildWidget()
          ));