Facing issue when clicked on web refresh button

156 Views Asked by At

I m facing issue in reloading web page that is made using flutter code, this issue is coming when I m trying to auto refreshing the list in web but it is working perfectly in mobile and when in web it is not doing auto refresh then have to do hard refresh at that time it is throwing this error as mention in image.

click here for error image view

I m using flutter_riverpod and go_router package for routing and there I have declared the page as mention below:

GoRoute(
      name: AppRoutes.xyz,
      path: AppRoutes.xyz,
      builder: (BuildContext context, GoRouterState state) {
        var arg = state.extra as Map<String, dynamic>;
        final drawerIndex = arg['drawerIndex'];
        final userId = arg['user_id'];
        return XYZScreen(
          drawerIndex: drawerIndex,
          userId: userId,
        );
      },
    ),

I think the issue is with auto refresh and web hard refresh also, for auto refresh I have given

Navigator.pop(context, true);

on save button when I m filling the form and calling saveMethod() for redirecting it to list screen where auto-refresh data activity is happening on screen.

Open for all suggestion as it would be very helpful to solve the issue. let me know if more details are needed in terms of code or explanation will update the question.

0

There are 0 best solutions below