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