logoalt Hacker News

oDottoday at 9:43 AM3 repliesview on HN

Does anyone know if the original promise of their simple layout model proved itself?

IIRC, the Flutter team mentioned how using just width/height constraints is enough to represent all relevant layouts. This sounds very nice, being so much simpler than Flexbox and miles ahead of CSS Grid ergonomics.

Did it live up to the promise or did they expand the model with Flex/Grid/etc?


Replies

faangguyindiatoday at 12:30 PM

It's much easier to fix flutter layout issues than CSS on web in my experience.

phoghedtoday at 11:44 AM

The web almost got constraint based layout. Well maybe almost is too strong, but it was a candidate. CCSS.

We got tables and floats instead.

gman83today at 10:02 AM

The premise is a bit off. Flutter was never just width/height: the model is min/max box constraints. The core rule is: constraints go down, sizes come up, parent sets position.

Row and Column are just layout algorithms built on that same model, not separate engines added later. GridView uses the sliver system internally, but still doesn't require anything like CSS Grid's general layout model. The render API is open enough for custom layouts too, so packages like https://pub.dev/packages/boxy build directly on it