Flutter GoRouter Go and Push

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 31

  • @haddow777
    @haddow777 Рік тому +1

    I can't remember, but doesn't Go and Push have different screen stack implications? Like Go erases previous screens from memory, so going back means reloading and rebuilding the previous screen? Or that push leaves the precious screen on the stack, so going back means it's a very light operation, but you could end up with lots of wasted memory if used all the time?
    Honestly, I've seen so many screen sticking architectures now I can't remember if that was the case here or not. If it is though, that would be an important factor to have in mind as both options can have serious negative impacts under certain circumstances.

    • @biigsmokee
      @biigsmokee Рік тому

      that's exactly what he says. push adds it to the stack and go replaces the stack with the route

  • @fixeroftheinternet
    @fixeroftheinternet 2 роки тому +1

    This is an excellent video that clearly explains the difference between push and go for go_router navigation.

  • @laurent1043
    @laurent1043 2 роки тому

    Thank you for this nice explained video, i've a question, can we use go router with GetX and remove GetMaterialApp? is it good for GetXControllers dispose ?

    • @dbestech
      @dbestech  2 роки тому +1

      if you use getx I don't suggest to use go_router. Getx is cool too. Removing GetMateialApp may cause unpredictable problem

  • @kamilboryczka7117
    @kamilboryczka7117 2 роки тому +2

    Can you show how to pass objects between pages by using go_router?

    • @dbestech
      @dbestech  2 роки тому +2

      I will create one in a few days.

  • @alirezakashani2955
    @alirezakashani2955 2 роки тому

    hi thank you so much, can you please tell how we can create a bottomNavigationBar with go_router package??

  • @EvgeniyYatsenko
    @EvgeniyYatsenko Рік тому

    Very helpful thanks

  • @nehakushwah8055
    @nehakushwah8055 Рік тому

    .go() is not working for me, do you know why

  • @kowsitweencraft
    @kowsitweencraft 2 роки тому

    hey hi..can you post flutter BloC post api ...u already having a video..but it was with firebase...can you post a video using only api...thanks in afdvance

    • @dbestech
      @dbestech  2 роки тому +1

      Yes, I understand. But you can change based on this ua-cam.com/video/PEQnFCIspAk/v-deo.html. It's just wrap the api call using http package. Not much difference

    • @kowsitweencraft
      @kowsitweencraft 2 роки тому

      @@dbestech thank u so much..

  • @prasantkumar7693
    @prasantkumar7693 2 роки тому

    Thank you 😃

    • @dbestech
      @dbestech  2 роки тому

      You're welcome 😊

  • @3kdevelopers185
    @3kdevelopers185 Рік тому

    Sir how to remove all screens from stack (push named and remove until) in go router
    ❤ from PAKISTAN

  • @mustafahassan9383
    @mustafahassan9383 2 роки тому

    I have an issue with this package, when I try to navigate to another page nothing happens although it prints the location in the debug panel!!!!!!!!

    • @dbestech
      @dbestech  2 роки тому +1

      what do you want it to do? please detail

    • @mustafahassan9383
      @mustafahassan9383 2 роки тому

      Basically I wanted to when I click a button to navigate to other page but that didn't happen although the code is correct, I knew the problem was how I implement redirect method in the package, when I disable the redirect it navigates normally

  • @arupnaskarbkp
    @arupnaskarbkp 2 роки тому

    Sir Please increase your audio quality

    • @dbestech
      @dbestech  2 роки тому

      I will take care of it next time

  • @mehrozezaidi7562
    @mehrozezaidi7562 2 роки тому

    Hi! What if I define routes that way :
    GoRouter(
    debugLogDiagnostics: true,
    routes: [
    GoRoute(
    path: '/',
    builder: (BuildContext context, GoRouterState state) {
    return const Home();
    },

    ),
    GoRoute(
    path: '/details',
    builder: (BuildContext context, GoRouterState state) {
    return const Details();
    },
    ),
    ],
    );
    OR
    GoRouter(
    debugLogDiagnostics: true,
    routes: [
    GoRoute(
    path: '/',
    builder: (BuildContext context, GoRouterState state) {
    return const Home();
    },
    routes: [
    GoRoute(path: 'details',builder: (context, state) {
    return Details();
    },),

    ]
    ),

    ],
    );
    What is the difference between both ways? please do let me know.

    • @dbestech
      @dbestech  2 роки тому +1

      I just tried first way. Let me know if you tried them both and result

    • @mehrozezaidi7562
      @mehrozezaidi7562 2 роки тому

      I tried both cases, in the first case we'll have absolute path and in the second one we'll have a relative path.

  • @theblack6339
    @theblack6339 2 роки тому

    Please do quran app using api

    • @dbestech
      @dbestech  2 роки тому

      Where do you get the api?

    • @dhalle
      @dhalle 2 роки тому

      @@dbestech Please do us quran an Using Provider State Management

  • @theacid1
    @theacid1 Рік тому

    Confusing explanation