Skip to content

Fix app layout #1095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open

Fix app layout #1095

wants to merge 3 commits into from

Conversation

zaelgohary
Copy link
Contributor

@zaelgohary zaelgohary commented Jun 4, 2025

Changes

Add app layout, merge registered screen & home, remove layout drawer

Related Issues

Tested Scenarios

Navigate to all screens back and forth


int currentTabIndex = globals.tabController.index;

// Return app bar actions based on current tab
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The hard coded numbers make this code hard to maintain. If the router order changes, this will break. Maybe we can use named constants or a configuration map instead.

@AlaaElattar
Copy link
Contributor

When i tested the app, its the same flow. I don't get What specific issue does this solve ?

@zaelgohary
Copy link
Contributor Author

When i tested the app, its the same flow. I don't get What specific issue does this solve ?

As mentioned in the attached issue, the code is the same. I just changed the app layout to be dynamic instead of fixed in every screen. Notice the bottom nav with every new navigation, it's not reloaded anymore.

@zaelgohary zaelgohary requested a review from AlaaElattar June 18, 2025 14:31
State<AppLayout> createState() => _AppLayoutState();
}

class _AppLayoutState extends State<AppLayout> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I suggest creating simple data class to hold icon, label and index for each navigation entry to be used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

…stead of page number in home screen & home card
@zaelgohary zaelgohary requested a review from AlaaElattar June 22, 2025 13:06
… router is initialized and cache nav entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants