skip to Main Content

How to sort model data received from JSON using flutter_bloc?

I have a model: import 'dart:convert'; Forecast forecastFromJson(String str) => Forecast.fromJson(json.decode(str)); String forecastToJson(Forecast data) => json.encode(data.toJson()); class Forecast { List<ListElement> list; Forecast({ required this.list, }); factory Forecast.fromJson(Map<String, dynamic> json) => Forecast( list: List<ListElement>.from(json["list"].map((x) => ListElement.fromJson(x))), ); Map<String, dynamic> toJson() =>…

VIEW QUESTION
Back To Top
Search