SizedBox.square constructor Null safety

const SizedBox.square(
  1. {Key? key,
  2. Widget? child,
  3. double? dimension}
)

Creates a box whose width and height are equal.

Implementation

const SizedBox.square({Key? key, Widget? child, double? dimension})
  : width = dimension,
    height = dimension,
    super(key: key, child: child);