Responsive Ad Area

Share This Post

test

How to reload / refresh / rebuild my push or 1st page when i come back with navigator.pop of another page?

I am navigating to country page with navigator.push. I am storing the country ids and data and passing them in navigator.pop but when i get back to my 1st page my page state or data is not shown or refresh.

I want to update my page data through api in inistate and ui with new values when i get back with navigator.pop.

Kindly help me here…

I have tried basic like navigator.pop(context, CountryValues) and setting setstate in intstate. but other than that i could not find any support.

Page 1 :

void initState() {
    super.initState();
    setState(() {
      loadUserID();
    });
  }


if (val == 2) {
   Navigator.push(ctx, MaterialPageRoute(builder: (context) => ChangeCountry()));



page 2 :
itemBuilder: (BuildContext context, int index) {
                  return GestureDetector(
                    child: InkWell(
                      onTap: () {
                        tempCountry = CountryModel.Message(
                          id: countryList[index].id,
                          name: countryList[index].name,
                        );
                        setCountry();
                        Navigator.pop(context, tempCountry);
                      },


How to reload / refresh / rebuild my push or 1st page when i come back with navigator.pop of another page?
How to reload / refresh / rebuild my push or 1st page when i come back with navigator.pop of another page?
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar