Solved: Flutter independent model classes

Question:

I have created a weather model class with its parameters and I’m going to get data from the API.
But I’m a bit curious If I want to get data from 2 APIs with different parameters how do I use the same model classes?
Example: API 1 -> returns ‘temp’ and API 2 -> returns ‘temperature’ and I want to use the same model class.
Is this even possible? If so how should I do it?

Best Answer:

Include all parameters from both api response and make params which are different in both Apis nullable.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com