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

Bottom Overflowed By Pixels and does not working navigate function

enter image description here

The above photo shows the error what i have facing .bottom is overflowed 484 pixel and also navigation is does not working in sidebar . then i coudn’t able to find the error.

class MyHeaderDrawer extends StatelessWidget {
  const MyHeaderDrawer({super.key});

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Center(
        child: Container(
          color: Colors.green,
          width: double.infinity,
          height: 200,
          padding: const EdgeInsets.only(top: 40.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Container(
                height:80,
                width: 80,
                decoration: const BoxDecoration(
                  image: DecorationImage(
                    image: AssetImage("img/logo.png"),
                  ),
                ),
              ),
              const Text(
                "Travel With Me",
                style: TextStyle(
                    color: Colors.white, fontSize: 15, fontWeight: FontWeight.bold),
              ),
              const Text(
                "info@findpath@gmail.com",
                style: TextStyle(
                    color: Color.fromARGB(255, 106, 105, 105), fontSize: 10),
              ),
              const SizedBox(
                height: 70,
              ),
              Container(
                child: Column(
                  children: [
                    ListTile(
                      title: const Text('My TODO'),
                      leading: const Icon(Icons.list),
                      onTap: () {
                        Navigator.of(context).push(
                          MaterialPageRoute(
                            builder: (context) => const HomePage(),
                          ),
                        );
                      },
                    ),
                    ListTile(
                      title: const Text('My Time Table'),
                      leading: const Icon(Icons.timeline),
                      onTap: () {
                        Navigator.of(context).push(
                          MaterialPageRoute(
                            builder: (context) => const HomePage(),
                          ),
                        );
                      },
                    ),
                    ListTile(
                      title: const Text('Notification'),
                      leading: const Icon(Icons.notification_add),
                      onTap: () {
                        Navigator.of(context).push(
                          MaterialPageRoute(
                            builder: (context) => const HomePage(),
                          ),
                        );
                      },
                    ),
                
                    ),
                  
                    const Divider(color: Colors.black),
                    ListTile(
                      title: const Text('About Us'),
                      leading: const Icon(Icons.person),
                      onTap: () => {
                        Navigator.push(
                          context,
                          MaterialPageRoute(builder: (context) => const About()),
                        )
                      },
                    ),
                    ListTile(
                      title: const Text('Privacy and policy'),
                      leading: const Icon(Icons.privacy_tip),
                      onTap: () {
                        Navigator.of(context).push(
                          MaterialPageRoute(
                            builder: (context) => const PrivacyAndPolicy(),
                          ),
                        );
                      },
                    )
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

why we cannot use onPresed() , insted of Using onTap(). i need to resolve my problem .could you please help me .

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

thank you!

chamithu.

>Solution :

Hope this will help you,

return SafeArea(

      
      child: Column(
       
        children: [
          Container(
            color: Colors.green,
            width: double.infinity,
            height: 200,
          child: Column(
             mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment : CrossAxisAlignment.center,
          children: [
             Container(
            height:80,
            width: 80,
            decoration: const BoxDecoration(
              
            ),
               child: Placeholder()
          ),
          const Text(
            "Travel With Me",
            style: TextStyle(
                color: Colors.white, fontSize: 15, fontWeight: FontWeight.bold),
          ),
          const Text(
            "info@findpath@gmail.com",
            style: TextStyle(
                color: Color.fromARGB(255, 106, 105, 105), fontSize: 10),
          ),
          ])),
         
          
         Container(
            child: Column(
              children: [
                ListTile(
                  title: const Text('My TODO'),
                  leading: const Icon(Icons.list),
                  onTap: () {
                   Navigator.of(context).push(
                      MaterialPageRoute(
                        builder: (context) => const HomePage(),
                      ),
                    );
                  },
                ),
                ListTile(
                  title: const Text('My Time Table'),
                  leading: const Icon(Icons.timeline),
                  onTap: () {
                   Navigator.of(context).push(
                      MaterialPageRoute(
                        builder: (context) => const HomePage(),
                      ),
                    );
                  },
                ),
                ListTile(
                  title: const Text('Notification'),
                  leading: const Icon(Icons.notification_add),
                  onTap: () {
                   Navigator.of(context).push(
                      MaterialPageRoute(
                        builder: (context) => const HomePage(),
                      ),
                    );
                  },
                ),
            
              
                const Divider(color: Colors.black),
                ListTile(
                  title: const Text('About Us'),
                  leading: const Icon(Icons.person),
                  onTap: () {
                   Navigator.of(context).push(
                      MaterialPageRoute(
                        builder: (context) => const HomePage(),
                      ),
                    );
                  },
                ),
                ListTile(
                  title: const Text('Privacy and policy'),
                  leading: const Icon(Icons.privacy_tip),
                  onTap: () {
                    Navigator.of(context).push(
                      MaterialPageRoute(
                        builder: (context) => const HomePage(),
                      ),
                    );
                  },
                )
              ],
            ),
            )
          ]

    ));
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