flex method

Widget flex(
  1. int? flex
)

A modifier that wraps its widget in an Expanded view.

Example:

Icon(Icons.person)
    .flex(1);

Implementation

Widget flex(int? flex) {
  return Expanded(child: this, flex: flex ?? 1);
}