Search code examples
fluttercontainerstoast

Flutter how can I fill one edge of a container ? [ Toast notificaton container]


What I want to do is following left corner in the container.

I tried to do it putting another green container in it but, it does not fit with the border radius of original container. enter image description here


Solution

  • like this?

    ClipRRect(
        borderRadius: BorderRadius.all(Radius.circular(16)),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: [
            Container(
              width: 10,
              height: 100,
              decoration: BoxDecoration(
                  color: Colors.green,
              ),
            ),
            Container(
              width: 390,
              height: 100,
              decoration: BoxDecoration(
                  color: Colors.greenAccent,
              ),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.start,
                children: [
                  Icon(Icons.check_circle),
                  Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text("YOUR MAIN TEXT"),
                      Text("YOUR TEXT"),
                    ],
                  ),
                ],
              ),
            ),
          ],
        ),
      )