Flutter: Expanded vs Flexible

Question

Asked by user6274128 on October 04, 2018 (source).

I've used both Expanded and Flexible widgets and they both seem to work the same.

What is the difference between Expanded and Flexible?

Answer

Question answered by Raouf R (source).

Scaffold(
  appBar: AppBar(),
  body: Column(
    children: <Widget>[
      Row(
        children: <Widget>[
          buildExpanded(),
          buildFlexible(),
        ],
      ),
      Row(
        children: <Widget>[
          buildExpanded(),
          buildExpanded(),
        ],
      ),
      Row(
        children: <Widget>[
          buildFlexible(),
          buildFlexible(),
        ],
      ),
    ],
  ),
);

enter image description here

DART FLUTTER FLUTTER-LAYOUT FLUTTER-WIDGET
SHARE: