performLayout method

  1. @override
void performLayout(
  1. Constraints constraints
)
override

Called to perform the actual layout computation for this render object.

Implementation

@override
void performLayout(Constraints constraints) {
  _ensureTabWidthsCached();
  int totalWidth = 0;
  for (final w in _cachedTabWidths) {
    totalWidth += w + labelPadding.horizontal;
  }
  if (_tabs.isNotEmpty && _tabs.length > 1) {
    totalWidth += _tabs.length - 1;
  }
  size = Size(totalWidth, 2);
}