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 : data to go over the curve parts when I scroll

i post two images, first is looking good but when i am scrolling my data then my ui is getting messed up(second image)

I want it to go under the curve parts when I scroll.

HOW TO DO IT

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

This is my code

return Scaffold(
      backgroundColor: appGreenColor,
      appBar: new AppBar(
        centerTitle: false,
        backgroundColor: appGreenColor,
        elevation: 0,
        title: Padding(
          padding: const EdgeInsets.only(left: 16.0),
          child: Image.asset(
            "lib/Assets/bellazIcon.png",
            fit: BoxFit.fill,
            height: 40,
            width: 78,
          ),
        ),
        actions: [
          Padding(
            padding: const EdgeInsets.only(right: 8.0),
            child: IconButton(
                icon: Image.asset(
                  "lib/Assets/notification1.png",
                  height: 22,
                  width: 22,
                ),
                onPressed: () {
                  Navigator.push(
                      context,
                      MaterialPageRoute(
                          builder: (context) => NotificationList()));
                }),
          )
        ],
      ),
      body: Container(
        height: MediaQuery.of(context).size.height - 70,
        decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.only(
                topLeft: Radius.circular(30), topRight: Radius.circular(30))),
        child: SingleChildScrollView(
          child: Column(
            children: [
              Padding(
                padding: const EdgeInsets.symmetric(horizontal: 3),
                child: Column(
                  children: [
                    locationView(),
                    imageSlider(),
                    genderView(),
                    categories(),
                    isMan == true
                        ? maleTopBranches.length == 0
                            ? Container()
                            : topRatedSalons(maleTopBranches)
                        : topRatedSalons(femaleTopBranches),
                  ],
                ),
              ),
              offerImage(),
              Padding(
                padding: const EdgeInsets.symmetric(horizontal: 2.0),
                child: Column(
                  children: [
                    services(),
                    nearByAppointment(),
                  ],
                ),
              ),
              infoImage()
            ],
          ),
        ),
      ),
    );

this image looks fine till i am not scrolling

enter image description here

but when i scrolling image my data comes onto that curve

enter image description here

This answer work for me

Container(
   clipBehavior: Clip.hardEdge,
   height: MediaQuery.of(context).size.height - 70,
   decoration: const BoxDecoration(
   color: Colors.white,
   borderRadius: BorderRadius.only(topLeft: Radius.circular(30), 
                     topRight: Radius.circular(30))),
           child: ...,
         ),)

>Solution :

try to add : clipBehavior: Clip.hardEdge

Container(
   clipBehavior: Clip.hardEdge,
   height: MediaQuery.of(context).size.height - 70,
   decoration: const BoxDecoration(
   color: Colors.white,
   borderRadius: BorderRadius.only(topLeft: Radius.circular(30), 
                     topRight: Radius.circular(30))),
           child: ...,
         ),)
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