0

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@[email protected]",
                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 .

thank you!

chamithu.

1 Answer 1

0

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@[email protected]",
            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(),
                      ),
                    );
                  },
                )
              ],
            ),
            )
          ]

    ));
Sign up to request clarification or add additional context in comments.

1 Comment

Genius_balu its working brother thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.