square method

Widget square({
  1. Widget? child,
  2. Key? key,
})

Returns a square SizedBox with dimensions equal to the value of this num.

Optionally, a child widget can be passed along with an optional key.

Implementation

Widget square({Widget? child, Key? key}) =>
    SizedBox.square(dimension: toDouble(), key: key, child: child);