Skip to content
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

ListView automatically adds padding from MediaQuery in NavigationView 🐛 #884

Closed
ricardoboss opened this issue Jul 12, 2023 · 0 comments · Fixed by #899
Closed

ListView automatically adds padding from MediaQuery in NavigationView 🐛 #884

ricardoboss opened this issue Jul 12, 2023 · 0 comments · Fixed by #899
Labels
bug Something isn't working

Comments

@ricardoboss
Copy link

Describe the bug

When on a mobile device with a NavigationView from fluent_ui, the navigation items are shifted downwards. Additionally, the footer items show a strange padding above them.

To Reproduce
Steps to reproduce the behavior:

  1. Check out https://github.com/ricardoboss/fluent_ui_safe_area_bug
  2. Run the app on a mobile device (or simulator) with a display cutout (so that the SafeArea would add a padding)
  3. Notice that the items are not positioned directly below the app bar
  4. Wrap the whole app in a SafeArea widget
  5. Notice the items are positioned directly below the app bar

Expected behavior

The items should be positioned directly below the app bar. Also, the footer items should not extend their container beyond their total height.

Screenshots
This screenshot shows the current state:

While this is the expected output:

This is a video showing the behaviour:

Screen.Recording.2023-07-12.at.18.02.23.mov

Additional context

I used the widget detail tree from the flutter inspector and the padding gets added by a SliverPadding by the ListView via the MediaQuery.
The documentation states:

By default, ListView will automatically pad the list's scrollable extremities to avoid partial obstructions indicated by MediaQuery's padding. To avoid this behavior, override with a zero padding property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants