Hej!,
so I found that List() is deprecated. How can I initiate the List and run for the length of my _data.length and fill it with my json _data[I] now?
Greetings Noob TopTickTom
class WakeProvider {
Client client = Client();
fetchFeatures() async {
final response = await client.get('$_root/.json');
if (response.statusCode == 200) {
final parsedJson = json.decode(response.body);
List _data = parsedJson['employee'];
List _result = List();
for (int i = 0; i < _data.length; i++) {
_result.add(EmployeeModel.fromJson(_data[i]));
}
return _result;
} else {
throw NullThrownError();
}
}