getx icon indicating copy to clipboard operation
getx copied to clipboard

Add support for State Restoration in getx

Open na2axl opened this issue 3 years ago • 6 comments

Hi @jonataslaw, I've just added the support of restorationScopeId in App widgets. Nothing fancy, just passing property value to CupertinoApp or MaterialApp.

Setting a restorationScopeId is an important step in Flutter to implement a State Restoration mechanism (like restore the navigation history stack even after the app is killed by the OS). So I think it's something that getx should support too.

EDIT

After some tests with the first changes, the restoration works but the user had to write some extra code which getx can manage to do for him... So, I plan to add on this PR a kind of near-full support for state restoration in getx. Any comments/discussion about it is appreciated 🙂

na2axl avatar May 23 '21 10:05 na2axl

Interesting additions @na2axl, thanks for the PR. @jonataslaw would you mind give it a try ?

roipeker avatar May 28 '21 15:05 roipeker

Hey @roipeker, thanks. If needed I can build an example app to showcase the feature. Currently I'm using it in my app (a chat application) to allow users to directly open the discussion they have left when they have closed the app, even after the OS have killed the app, and everything is working fine 🙂

na2axl avatar May 28 '21 23:05 na2axl

Really great PR. What worries me at the moment is just that we are moving to Navigator 2.0. So to avoid conflict, I will merge this PR when the migration is done. Thank you for that

jonataslaw avatar Jun 03 '21 14:06 jonataslaw

when will this restoration state be released?

parmarravi avatar Nov 27 '21 16:11 parmarravi

Required for my project

andzejsw avatar Feb 18 '22 11:02 andzejsw

is there any progress with this PR?

adnumaro avatar Jun 27 '22 15:06 adnumaro

What's the status of this PR?

gregor-vi avatar Nov 14 '22 10:11 gregor-vi

@na2axl im interested in your PR, do you know if it will work with navigator2 and getx5 ?

dgagnon avatar Jul 08 '23 16:07 dgagnon

Hello, please what's the status of this PR?

Frankdroid7 avatar Nov 23 '23 11:11 Frankdroid7