flutter decode json code example
Example 1: flutter generate json files
flutter packages pub run build_runner build
Example 2: json decode list flutter
Iterable l = json.decode(response.body);
List<Post> posts = List<Post>.from(l.map((model)=> Post.fromJson(model)));