Search code examples
flutterflutter-layoutflutter-webflutter-animationflutter-test

finding the best way to design this?


enter image description here

is it possible to make one side of container small and other big as shown in this picture, in flutter. If yes, how?

EDIT: I have accepted the answer which helps in this case.


Solution

  • A simpler approach would be to use Transform on the Container(); the only limitation here would be to stop Container's children from being skewed too. You can use the Transform class as a starting point for this, like this:

    Transform(
      alignment: FractionalOffset.center,
      transform: Matrix4.identity()
      ..setEntry(3, 2, 0.01)
      ..rotateY(-(5 / (180 / math.pi))),
      child: ItemContainerWidget(),
    )

    That would give you something like this -

    enter image description here