0

I want to achieve Url Navigation in Flutter Web using Gorouter and PageView-builder built within a single scaffold. I want to change the PageView item only and retain the remaining parts of the scaffold without rendering them again.

Salman Ali
  • 169
  • 1
  • 4

1 Answers1

1

You can create a dynamic page. And when navigating pass the id in the slug. Using the slug fetch data. To make this in a single scaffold use the slug inside the scaffold to create some widgets that will dynamically build using the slug.

GoRoute(
  name: yourPage,
  path: '/yourPage/:slug';,
  builder: (context, state) {
    final id = state.params['slug'];
    return YourPage(
      key: state.pageKey,
      slug: id,
    );
  },
),
monzim
  • 526
  • 2
  • 4
  • 13