performLayout method
Called to perform the actual layout computation for this render object.
Implementation
@override
void performLayout(Constraints constraints) {
int totalWidth = 0;
for (final item in items) {
totalWidth += stringWidth(item.label) + 2;
}
int maxDropdownHeight = 1;
if (openMenuIndex >= 0 && openMenuIndex < items.length) {
maxDropdownHeight += items[openMenuIndex].children.length;
}
size = Size(totalWidth, maxDropdownHeight);
}