preferredSize property

Size preferredSize
override

A size whose height depends on if the tabs have both icons and text.

AppBar uses this size to compute its own preferred size.

Implementation

@override
Size get preferredSize {
  for (Widget item in tabs) {
    if (item is Tab) {
      final Tab tab = item;
      if (tab.text != null && tab.icon != null)
        return Size.fromHeight(_kTextAndIconTabHeight + indicatorWeight);
    }
  }
  return Size.fromHeight(_kTabHeight + indicatorWeight);
}