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

Nested wizards #287

Open
jpnurmi opened this issue Jun 16, 2023 · 1 comment
Open

Nested wizards #287

jpnurmi opened this issue Jun 16, 2023 · 1 comment

Comments

@jpnurmi
Copy link
Contributor

jpnurmi commented Jun 16, 2023

Wizard(
  routes: {
    '/a': WizardRoute(builder: ...),
    '/b': WizardRoute(
      children: {
        '/1': WizardRoute(builder: ...),
        '/2': WizardRoute(builder: ...),
        '/3': WizardRoute(builder: ...),
      },
    ),
    '/c': WizardRoute(builder: ...),
  },
)

See also:

@jpnurmi
Copy link
Contributor Author

jpnurmi commented Jun 16, 2023

An alternative option that was discussed was to establish some kind of parent-child relationship between controllers:

final parent = WizardController(
  routes: {
    '/a': WizardRoute(builder: ...),
    '/b': WizardRoute(builder: (_) => Wizard(controller: child)),
    '/c': WizardRoute(builder: ...),
  },
)

final child = WizardController(
  parent: parent,
  routes: {
    '/1': WizardRoute(builder: ...),
    '/2': WizardRoute(builder: ...),
    '/3': WizardRoute(builder: ...),
  },
);

@jpnurmi jpnurmi transferred this issue from canonical/wizard_router Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant