'Data Type of Color.?? to create a model class in Flutter
Hi I've a question to create a json response to model class in flutter.
My response from API is like this :
{
"status": 200,
"message": "data fetch successfull",
"data": [{
"view_type": 1,
"heading_title": "Trending Now",
"trend_list": [{
"title": "",
"subtitle": "",
"price": 1500,
"display_image": "",
"size": [6, 7, 8, 9, 10],
"rating": 4,
"isFavourite": false,
"container_color": ["0xFF559BE2", "0xFF2F53CB"],
"image_shoe": [{
"shoe_image": "",
"color": "0xFF559BE2",
"container_color": ["0xFF559BE2", "0xFF559BE2"]
}, {
"shoe_image": "",
"color": "0xFF559BE2",
"container_color": ["0xFF559BE2", "0xFF559BE2"]
}, {
"shoe_image": "",
"color": "0xFF559BE2",
"container_color": ["0xFF559BE2", "0xFF559BE2"]
}, {
"shoe_image": "",
"color": "0xFF559BE2",
"container_color": ["0xFF559BE2", "0xFF559BE2"]
}, {
"shoe_image": "",
"color": "0xFF559BE2",
"container_color": ["0xFF559BE2", "0xFF559BE2"]
}]
}]
}
]
}
So My Problem is in Container Box Decoration gradient Color accept Color not in String.
So what will be Data type should I add in Model class.?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
