PreferredSize constructor Null safety

const PreferredSize(
  1. {Key? key,
  2. required Widget child,
  3. required Size preferredSize}
)

Creates a widget that has a preferred size that the parent can query.

Implementation

const PreferredSize({
  super.key,
  required this.child,
  required this.preferredSize,
});