Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Stack circle avatar on top of drawer

How can I stack circle avatar on top of a drawer,
Something like this
enter image description here

So far I managed to make the drawer like that by wrapping it in a Padding widget

Padding(
      padding: const EdgeInsets.fromLTRB(0, 80, 0, 0),
      child: Drawer(
        backgroundColor: Colors.white,
        width: MediaQuery.of(context).size.width * 0.7,

How can I stack the circle avatar like that ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This code might help you

Padding(padding: const EdgeInsets.fromLTRB(0, 80, 0, 0),
  child: Stack(
    clipBehavior: Clip.none,
    children: [
      Drawer(
        backgroundColor: Colors.white,
        width: MediaQuery.of(context).size.width * 0.7,
      ),
      Positioned(
        top: -40,
        right: 16,
        child: Container(
        width: 80,
         height: 80,
        decoration: BoxDecoration(
          shape: BoxShape.circle,
          color: Colors.red,
        ),
      ),)
    ],
  ),
)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading