rectFromGrid method
Implementation
Rect? rectFromGrid({int? column, int row = 1, String? singlePT, required List<NamedLine> verticals, required List<NamedLine> horizontals, bool isGlobal = true}){
assert(verticals.length > 1 && horizontals.length > 1);
assert(column != null || singlePT != null);
Rect? measured;
if(singlePT != null){
measured = measuredPT(singlePT);
}else{
measured = measuredCell(column!, row);
}
if(measured != null){
return Rect.fromLTRB(verticals.first.computeWidth(measured.size), horizontals.first.computeHeight(measured.size),
verticals.last.computeWidth(measured.size), horizontals.last.computeHeight(measured.size)).shift( isGlobal ? measured.topLeft : Offset.zero );
}
return null;
}