flexible method

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

Make a StatefulWidget Flexible. Example:

Row(
 children: [
  TextField(controller: TextEditingController()).flexible(),
  TextField(controller: TextEditingController()).flexible(),
 ],
 ),

Implementation

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