Expanded constructor Null safety

const Expanded(
  1. {Key? key,
  2. int flex = 1,
  3. required Widget child}
)

Creates a widget that expands a child of a Row, Column, or Flex so that the child fills the available space along the flex widget's main axis.

Implementation

const Expanded({
  Key? key,
  int flex = 1,
  required Widget child,
}) : super(key: key, flex: flex, fit: FlexFit.tight, child: child);