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

icon at bottom right corner flutter

I want like this
enter image description here

my code

SizedBox(
height: 150,
width: 100,
child: Card(
elevation: 2,
semanticContainer: true,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
child: Container(
decoration: BoxDecoration(
color:Color(0xffffffff) ,
borderRadius: BorderRadius.circular(20)
),
child: Stack(
children: [
Column(
children: [
Image.network(‘https://vipspar.com/wp-content/uploads/2021/12/6152-480×480.jpg’),
Text(‘Cornflacks’),
Text(‘MT 215’),
],
),
Positioned(
right: -2,
bottom: -20,
child: Container(
height: 50,
width: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xffEAEFF2)
),
child: Center(
child: IconButton(onPressed: () {

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

                                 }, icon: Icon(Icons.favorite_border)),
                                       ),
                                     ))
                               ],
                             ),
                           ),
                         ),
                       );

>Solution :

you can align icon at bottom corner via this :

Stack(
  children: [
    SizedBox(
      height: 150,
      width: 100,
      child: Card(
        elevation: 2,
        semanticContainer: true,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(20),
        ),
        child: Container(
          decoration: BoxDecoration(
            color: Color(0xFFFFFFFF),
            borderRadius: BorderRadius.circular(20),
          ),
          child: Column(
            children: [
              Image.network('https://vipspar.com/wp-content/uploads/2021/12/6152-480x480.jpg'),
              Text('Cornflakes'),
              Text('MT 215'),
            ],
          ),
        ),
      ),
    ),
    Positioned(
      bottom: 0,
      right: 0,
      child: Container(
        width: 50,
        height: 50,
        decoration: BoxDecoration(
          shape: BoxShape.circle,
          color: Color(0xFFEAEFF2),
        ),
        child: IconButton(
          onPressed: () {
            // Add your onPressed logic here
          },
          icon: Icon(Icons.favorite_border),
        ),
      ),
    ),
  ],
);
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