preferredSize property

  1. @override
Size get preferredSize
override

The size this AppBar prefers to be. Accounts for the height of the bottom widget if present.

Implementation

@override
Size get preferredSize {
  final bottomHeight = bottom?.preferredSize.height ?? 0;
  return Size.fromHeight(kToolbarHeight + bottomHeight);
}