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