I am new to flutter . How can we have ArrayList of object in model class flutter .
Following below is the model class I have . but I need to have a list of objects in the model.
class MonitorModel {
MonitorModel(this.id, this.unitName, this.customerName, this.location,
this.dateTime, this.totalRunHour, this.lastDayRunHour);
var id = "";
var unitName = "";
var customerName = "";
var location = "";
var anotherList<ModelList> = ArrayList()
var dateTime = "";
var totalRunHour = "";
var lastDayRunHour = "";
}
List<ModelList> anotherList = List<ModelList>();