PreferredSizeWidget constructor Null safety

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

Implementation

const factory PreferredSizeWidget({
  Key? key,
  required Size preferredSize,
  required Widget child,
}) = PreferredSize;