flexible method

Flexible flexible({
  1. Key? key,
  2. int flex = 1,
  3. FlexFit fit = FlexFit.loose,
})

Make a Column Flexible. Example:

Column(
 children: [
 MaterialButton(child: Text('Button 1'), onPressed: () {}).flexible(),
 MaterialButton(child: Text('Button 2'), onPressed: () {}).flexible(),
 ],
 ),

Implementation

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