collect static method
Simplifies creating a list of objects from JSON payload.
Implementation
static List<WorkoutEvent> collect(List<dynamic> list) {
final samples = <WorkoutEvent>[];
for (final Map<String, dynamic> map in list) {
final sample = WorkoutEvent.fromJson(map);
samples.add(sample);
}
return samples;
}