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 {
var height = customHeight;
if (height == null) {
return super.preferredSize;
} else {
return Size.fromHeight(height + indicatorWeight);
}
}