Code Monkey home page Code Monkey logo

Comments (6)

pennyfine avatar pennyfine commented on July 4, 2024 1

A Page
onTap:() async {
var res = await Get.to(() => B());
// refresh A Page
if (res != null && res == true)
controller.refresh();

}

from getx.

ssthiago avatar ssthiago commented on July 4, 2024 1

kindly give proper example cant understand

Future goToAnotherPage() async {
var response = await Get.toNamed(
AppRoutes.anotherPage,
arguments: {
'argument': 'myArgument',
},
);

// It will be executed only after you Get.back() from anotherPage.
if (response != null) {
// do something
}
}

I hope I have helped you @fisforfaheem =)

from getx.

fisforfaheem avatar fisforfaheem commented on July 4, 2024

kindly give proper example cant understand

from getx.

magic3584 avatar magic3584 commented on July 4, 2024

@pennyfine @ssthiago
Thanks guys, it works perfectly when using Get.back()!
But I have a more in-depth question: can I refresh when pop from deeper stack such as when route is A->B->C->D, make A refresh when pop from D directly using Get.until?

from getx.

DevTello avatar DevTello commented on July 4, 2024

maybe this helps: https://stackoverflow.com/questions/66272880/flutter-how-to-automatically-trigger-a-function-when-a-route-was-pushed-on-to-t

from getx.

RahnRazamai avatar RahnRazamai commented on July 4, 2024

@magic3584 for now you need to nest the Get.back(result: true). means in B-C-D all is calling Get.back(result: true) until it reaches A and in A u can refresh like the above answer..

from getx.

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.