width method

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

Returns a SizedBox with the width set to the value of this num.

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

Implementation

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