-3

I'd need to build a content widget with the red circle over the text content in Flutter, how can I do? enter image description here

Pimpi Rimpà
  • 75
  • 1
  • 8

1 Answers1

2

you can do it using stack widget

return Scaffold(
      body: Center(
        child: Container(
          width: 450,
          height: 200,
          color: Colors.white,
          child: Stack(
            children: [
              Align(
                alignment: Alignment.center,
                child: Container(
                  width: 400,
                  height: 150,
                  decoration: BoxDecoration(
                    color: Colors.blue,
                    borderRadius:BorderRadius.circular(20)
                  ),
                ),
              ),
              Align(
                alignment: Alignment.topRight,
                child: Container(
                  width: 100,
                  height: 100,
                  decoration: BoxDecoration(
                    color: Colors.red,
                    shape: BoxShape.circle
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );

enter image description here

Jaydeep chatrola
  • 2,423
  • 11
  • 17