findAndUpdateControlById method
Implementation
Control? findAndUpdateControlById(String id,
{bool update = false, Control? controlNew}) {
Control? controlFind;
for (var pages in lsPages) {
for (var row in pages.row) {
for (var control in row) {
if (control.id == id) {
controlFind = control;
if (update) control = controlNew!;
break;
}
}
if (controlFind != null) break;
}
if (controlFind != null) break;
}
return controlFind;
}