GithubHelp home page GithubHelp logo

Comments (6)

Mik77o avatar Mik77o commented on August 19, 2024 2

We encounter the same issue for 8.0.3.

class DialogAutoRoute extends CustomRoute {
  DialogAutoRoute({
    required super.page,
    super.barrierDismissible,
    super.path,
  }) : super(
          opaque: false,
          transitionsBuilder: TransitionsBuilders.fadeIn,
          durationInMilliseconds: dialogAutoRouteDefaultDuration,
          reverseDurationInMilliseconds: dialogAutoRouteDefaultDuration,
          customRouteBuilder: <T>(context, child, routePage) => DialogRoute(
            context: context,
            builder: (_) => child,
            barrierDismissible: barrierDismissible,
            settings: routePage,
          ),
        );
}

from auto_route_library.

vpohrebniako avatar vpohrebniako commented on August 19, 2024 1

Any plans on fixing this issue?

from auto_route_library.

Milad-Akarie avatar Milad-Akarie commented on August 19, 2024

@SergeShkurko try specifiying the type when returning your custom Route e.g DialogRoute<String>(....)

from auto_route_library.

LocLt-Mobile avatar LocLt-Mobile commented on August 19, 2024

I have same issue.

from auto_route_library.

Skogsfrae avatar Skogsfrae commented on August 19, 2024

@Milad-Akarie I'm running into the same problem mainly because I have a custom class that extends the CustomRoute class to avoid boilerplate code, so I can't explicitly pass the return type.

I have different CustomRoute classes with different animations that combined in the navigation stack perform different forward/back animations such as iOS modal animations styles.

class MyRoute extends CustomRoute {
  MyRoute({
    required super.page,
    ...
    super.opaque,
  }) : super(customRouteBuilder: <T>(BuildContext context,
    Widget child,
    AutoRoutePage<T> page,
  ) => MyRoutePage<T>(
              builder: (context) => child,
              settings: page,
            ));
}

I solved with this workaround that forces me to specify the return type in the navigation tree declaration too:

class MyRoute<R> extends CustomRoute {
  MyRoute({
    required super.page,
    ...
    super.opaque,
  }) : super(customRouteBuilder: (BuildContext context,
    Widget child,
    AutoRoutePage<T> page,
  ) => MyRoutePage<R>(
              builder: (context) => child,
              settings: page,
            ));
}

from auto_route_library.

Mixron469 avatar Mixron469 commented on August 19, 2024

Still same issues for me when I upgrade auto_route to Ver. 8, with my both custom bottomSheet route and dialog route.

from auto_route_library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.