avoid-flexible-outside-flex
Warns when a Flexible
widget is used outside the Flex
widget.
Example
❌ Bad:
class SomeWidget {
Widget build() {
return Column(children: [
Expanded(),
Container(Expanded()), // LINT: Avoid Flexible widgets outside Row, Column or Flex widgets.
]);
}
}
✅ Good:
class SomeWidget {
Widget build() {
return Column(children: [
Expanded(),
Container(SomeOtherWidget()),
]);
}
}