Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bloc state data retaining for all pages #3676

Closed
rahuloexe opened this issue Dec 28, 2022 · 4 comments
Closed

Bloc state data retaining for all pages #3676

rahuloexe opened this issue Dec 28, 2022 · 4 comments
Labels
question Further information is requested

Comments

@rahuloexe
Copy link

rahuloexe commented Dec 28, 2022

@felangel Please Help.
Hello Team,
I am new to bloc architecture.
I want to achieve this while pushing the same screen again and again in the navigation stack. Each page has a list of different data. Currently what is happening topmost screen data is showing on all previous screens while popping.
I want to achieve this with the bloc.
Please guide me here
Thanks.

@rahuloexe rahuloexe added the documentation Documentation requested label Dec 28, 2022
@rahuloexe rahuloexe changed the title docs: Bloc state data retaining for all pages Dec 28, 2022
@brenno3b
Copy link

Can you share a minimum reproducible example ?

@felangel felangel added question Further information is requested waiting for response Waiting for follow up and removed documentation Documentation requested labels Dec 28, 2022
@rahuloexe
Copy link
Author

rahuloexe commented Dec 31, 2022

Can you share a minimum reproducible example ?

Hello @brenno3b
Here is reference video from google drive.
https://drive.google.com/file/d/12-b21mTybjt0dyS6nMvHMdtDfW8OElvB/view

I want to fetching list data on each navigation and on pop previous list should come. I managed to do this with stateful widget states.
but with bloc states , list got overridden with the latest data on previous pages also.

Here is issue video facing with bloc implementation.
https://drive.google.com/file/d/127Waq68WL5vVEqnuVoTG2isJwwGvxbwD/view

@felangel
Copy link
Owner

felangel commented Jan 2, 2023

@rahuloexe can you please provide a link to a GitHub repo or DartPad that contains a minimum reproduction sample? Thanks!

@rahuloexe
Copy link
Author

@felangel @brenno3b
Thanks, Issue is resolved by creating a new bloc instance for the new screen pushed.

@felangel felangel closed this as completed Jan 4, 2023
@felangel felangel removed the waiting for response Waiting for follow up label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants