Replies: 1 comment 1 reply
-
|
You can make your Freezed classes receive a "parent" value, and pass that value yourself. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following scenario:
I have exercises that contain tasks. Now when I am on the exercise page it's no problem to navigate to the task page as I got access to my task right there. But if I want to reference the exercise from within the task page it becomes cumbersome. I know some libraries (not flutter libraries) that allow you to just call the .parent attribute on any given data model to get its parent.
Assume this model:
So basically I can do this on the exercise page:
But I want something like this as well on the task page:
Is there something equivalent in freezed aswell? Or what would be the most elegant way of achieving a similar behavior in freezed for flutter?
Beta Was this translation helpful? Give feedback.
All reactions