Repository navigation
|
Just stumbled across this library seems to solve my data problems, there are a few questions as the documentation is sparse.
Below is an example of the response: |
Answered by
frank06
Dec 7, 2021
Replies: 1 comment 2 replies
|
Hi @hinryd , I'm working on the new docs as we speak! I hope to have them up this week. In Flutter Data we use adapters to override behavior. Let's assume your model is called (1) We need to pass the deserializer a different root, so we override it: If all your models have this behavior (not only players) you can use it like In the model include the adapter and specify a new ID for (2) which really is a Hope this helps! |
2 replies
Answer selected by
hinryd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @hinryd , I'm working on the new docs as we speak! I hope to have them up this week.
In Flutter Data we use adapters to override behavior.
Let's assume your model is called
Player.(1) We need to pass the deserializer a different root, so we override it:
If all your models have this behavior (not only players) you can use it like