Unable to add custom navigation in other classes in flutter

Issue

I am new to flutter. I am creating UIs for both mobile and web view.

I followed a YouTube video and created a custom HeaderNavigation. It is working completely fine separately.

But when I try to add the header to another class I am getting a lot of errors. I searched google and tried to find different methods to add the navigation bar. But unable to find that.

Please help me to add header to another classes.

I am unable to add the code here, so I am sharing the GitHub repository link.

GitHub Repository

This is the error I am getting while running the above project.

1

2

3

4

5

Solution

You are nesting Scaffold(…) and placing the AppBar in a Column.

I moved the AppBar to the main Scaffold and placed the Cards in the body of the Scaffold – this seems to fix the issue, but I’m not sure this is the desired result. I’ve created a pull-request on your GitHub.

Try this, see if it helps.

Answered By – Hesam Chobanlou

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *