getRowModel method
Implementation
TableRowModel? getRowModel(int index) {
// model exists?
if (data == null) return null;
if (data.length < (index + 1)) return null;
if (rows.containsKey(index)) return rows[index];
if ((index < 0) || (data.length < index)) return null;
// build prototype
XmlElement? prototype =
S.fromPrototype(this.prototype, "${this.id}-$index");
// build row model
TableRowModel? model =
TableRowModel.fromXml(this, prototype, data: data[index]);
// defined height
if (prototypeModel!.height != null) heights['row'] = prototypeModel!.height;
// Register Listener to Dirty Field
if (model?.dirtyObservable != null) model?.dirtyObservable!.registerListener(onDirtyListener);
if (model != null) rows[index] = model;
return model;
}