Iterable l = json.decode(response.body); List<Post> posts = List<Post>.from(l.map((model)=> Post.fromJson(model)));