SingleChildStatelessWidget constructor Null safety

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

Creates a widget that has exactly one child widget.

Implementation

const SingleChildStatelessWidget({Key? key, Widget? child})
    : _child = child,
      super(key: key);