expanded method

Expanded expanded({
  1. int? flex,
})

Wraps this widget in an Expanded widget.

Parameters:

  • flex: Optional flex factor to control how much space this widget takes relative to siblings. Defaults to 1 if not specified.

Implementation

Expanded expanded({int? flex}) {
  if (flex == null) {
    return Expanded(child: this);
  } else {
    return Expanded(flex: flex, child: this);
  }
}