Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arguments is null when using HandlerType.function #265

Open
623637646 opened this issue Apr 8, 2022 · 1 comment
Open

Arguments is null when using HandlerType.function #265

623637646 opened this issue Apr 8, 2022 · 1 comment

Comments

@623637646
Copy link

Add type: HandlerType.function to the example code in README.

FluroRouter.appRouter.navigateTo(
  context,
  'home',
  routeSettings: RouteSettings(
    arguments: MyArgumentsDataClass('foo!'),
  ),
);

var homeHandler = Handler(
  type: HandlerType.function,   // set function as the type.
  handlerFunc: (context, params) {
    final args = context.settings.arguments as MyArgumentsDataClass;  // args will be null.
    return HomeComponent(args);
  },
);

expected: args is MyArgumentsDataClass('foo!')

@sbalex27
Copy link

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants