SizedBox.fromSize constructor Null safety

SizedBox.fromSize(
  1. {Key? key,
  2. Widget? child,
  3. Size? size}
)

Creates a box with the specified size.

Implementation

SizedBox.fromSize({ super.key, super.child, Size? size })
  : width = size?.width,
    height = size?.height;