skip to Main Content

I really don,t know how to create a parallelogram shape container in a flutter. I also found the flutter library for this but I can’t use it because this is not supported by null safety.
enter image description here

2

Answers


  1. For a shape like this you need to use CustomPainter for details on how to use it you can refer to this.

    You can also use a website like flutter shape maker for the same thing but to make it easier you can draw your shape and it’ll auto generate the code for you.

    Login or Signup to reply.
  2. You can use transform with skewX for this.

    Container(
      width: 400,
      height: 100,
      transform: Matrix4.skewX(-.3),
      decoration: BoxDecoration(
        border: Border.all(
          color: Colors.black,
        ),
        color: Colors.amber,
      ),
    ),
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search