preferredSize property
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 (final Widget item in tabs) {
if (item is Tab) {
final Tab tab = item;
if ((tab.text != null || tab.child != null) && tab.icon != null)
return Size.fromHeight(_kTextAndIconTabHeight + indicatorWeight);
}
}
return Size.fromHeight(_kTabHeight + indicatorWeight);
}