linebender/druid

Add missing layout widgets

Open

#659 opened on Mar 14, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Rust (9,091 stars) (567 forks)batch import
enhancementhelp wanted

Description

There are a number of basic layout widgets in flutter that we don't have.

  • LimitedBox: A widget that checks if incoming constraints are infinite, and constraints them.
  • FittedBox: A widget that fits a child within itself, in a number of ways (fill, fit, fillHeight, etc).
  • FractionallySizedBox: use a fraction of available space
  • AspectRatio: maintain an aspect ratio (this should report if it is passed tight constraints) #1645
  • OverflowBox: allow a child to overflow
  • ConstrainedBox: impose arbitrary(?) constraints on child? I think this should probably be represented as Fn(BoxConstraints) -> BoxConstraints or something.

In any case: none of these are super-duper-urgent, but I think we would like to have all of them eventually.

Contributor guide