maxDepth static method
columnGroupList
Returns the depth of how many levels the group has been set.
Implementation
static int maxDepth({
required List<PlutoColumnGroup> columnGroupList,
int level = 0,
}) {
int currentDepth = level + 1;
for (int i = 0; i < columnGroupList.length; i += 1) {
if (columnGroupList[i].hasChildren) {
final int depth = maxDepth(
columnGroupList: columnGroupList[i].children!,
level: level + 1,
);
if (depth > currentDepth) {
currentDepth = depth;
}
}
}
return currentDepth;
}