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

flutter i want to remove the extra icon that is overflowing out of my card

is it possible to make my icon fit in my card without the extra overflow i wanted my icon to tilt like that and only 70 to 80 percent of calendar icon to stay inside the card , send help pls i am beginner 🙂 thanks for help in advance

 GestureDetector(
                        onTap: () {
                          Navigator.push(context, MaterialPageRoute(builder: (context) => Calendarview()));
                        },
                        child: WidgetAnimator(
                          incomingEffect: WidgetTransitionEffects.incomingSlideInFromBottom(duration: Duration(seconds: 1)),
                            child: Card(
                              color: Colors.blueAccent,
                              elevation: 10,
                              shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(25),
                              ),
                              margin: const EdgeInsets.all(8),
                              child: Stack(
                                clipBehavior: Clip.antiAlias,
                                children: [
                                  Align(
                                    alignment: Alignment.bottomRight,
                                    child: SizedBox(
                                      width: 100,
                                      height: 100,
                                      child: Transform.rotate(
                                        angle: 320 * pi / 180,
                                        child: Icon(
                                          Icons.calendar_month,
                                          size: 120,
                                          color: Colors.white,
                                        ),
                                      ),
                                    ),
                                  ),
                                ],
                              ),
                            ),

                        ),
                      ),


my screen

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 :

You can override the clipBehavior of the Card widget to fix it.

Card(
  color: Colors.blueAccent,
  clipBehavior: Clip.antiAlias,
  elevation: 10,
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