flexible method

Widget flexible({
  1. int flex = 1,
  2. FlexFit? fit,
})

Wraps this widget in a Flexible inside a Row, Column or Flex.

flex sets its share of the space. fit defaults to FlexFit.loose, which lets the widget be smaller than its share.

Implementation

Widget flexible({int flex = 1, FlexFit? fit}) {
  return Flexible(flex: flex, fit: fit ?? FlexFit.loose, child: this!);
}