nylo-core / nylo

Nylo is the fastest way to build your next Flutter mobile app. Streamline your projects with Nylo's opinionated approach to building Flutter apps. Develop your next idea ⚡️
https://nylo.dev
MIT License
597 stars 61 forks source link

widget.data() still have data #100

Closed jitendravn closed 10 months ago

jitendravn commented 10 months ago

assume i have 3 screen 1 and 2 have relation between example screen 1 is listing page and 2 has view page but if come 2 screen using 3rd screen still widget.data() hold a value

agordn52 commented 10 months ago

Hi @jitendravn,

Which nylo_framework version are you using? In the latest version, you can set if the controller should retain the data.

jitendravn commented 10 months ago

I am having 3 screens - Screen 1, Screen 2 and Screen 3. I am using routeTo to send data to next screen. routeTo(PATH, data: SCREEN DATA); On next screen, I am using widget.data() to consume data from previous screen. Its working fine with sending data to the next/landing screen (example Screen 2 to Screen 3). My problem is - Data presisting (sent previously from screen 2), If I am using routeTo without data param from Screen 1 to Screen 3. Is there any way to clear the widget.data() on dispose()?

agordn52 commented 10 months ago

Hi @jitendravn,

Thanks for the information but can you confirm which version of the nylo_framework you are using?

This can be found in your pubspec.yaml file.

jitendravn commented 10 months ago

@agordn52 5.11.0

agordn52 commented 10 months ago

Hi @jitendravn,

Can you upgrade to the latest (v5.18.7) version?

nylo_framework: ^5.18.7

Here's the migration guide here

I hope that helps, once you've migrated to the latest version, try rerunning your project.

jitendravn commented 10 months ago

hi @agordn52 I have upgraded my project to the latest version. But I'm facing the same issue

agordn52 commented 10 months ago

Resolved.

Talked with @jitendravn via Google Meet and discovered his project wasn't updated to the latest (nylo_framework: ^5.18.7) version.

jitendravn commented 10 months ago

Thanks @agordn52 for the resolving the issue