flexible method
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,
);
}