Giter VIP home page Giter VIP logo

Comments (4)

Anas-Qasem avatar Anas-Qasem commented on September 26, 2024

use auto_route it is better

from flutter.

fwemaere avatar fwemaere commented on September 26, 2024

When GoRoute call an unwanted build, the value in state.uri is not the same as the value in GoRouter.of(context).routeInformationProvider.value.uri. state.uri seems to have a wrong value ?

        GoRoute(
          path: 'step1',
          builder: (BuildContext context, GoRouterState state) {
            debugPrint('GoRoute: builder step 1');
            // when unwanted rerender, the value in state.uri is not the same as the value in GoRouter.of(context).routeInformationProvider.value.uri
            debugPrint("GO ROUTER STATE > ${state.uri}"); // flutter: GO ROUTER STATE > /step1?param=Hello%20World 
            debugPrint(
                "GO ROUTER > ${GoRouter.of(context).routeInformationProvider.value.uri}"); // flutter: GO ROUTER > /step2
            final justAQueryParam =
                state.uri.queryParameters['param'] ?? 'No params';
            return Step1ScreenWithParam(justAQueryParam: justAQueryParam);
          },
        ),

from flutter.

huycozy avatar huycozy commented on September 26, 2024

Hi @fwemaere, this is working as intended, please see a similar issue filed before at #132049 and the response at #132049 (comment). Closing this as a duplicate of #132049.

When GoRoute call an unwanted build, the value in state.uri is not the same as the value in GoRouter.of(context).routeInformationProvider.value.uri. state.uri seems to have a wrong value ?

This looks similar to #147367. Please take a look to see if it is. If it's not similar to your case, please file a new issue. Thanks!

from flutter.

github-actions avatar github-actions commented on September 26, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

from flutter.

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.