Mitchell Goodwin ccae8cc794
Adjust padding for Cupertino sheet content (#162481)
Fixes #162215 and partially supports #162181.

The Cupertino sheet had two issues layout: It still had MediaQuery
padding at the top of the screen as if there was safe area content to
avoid and some of the sheet was permanently offscreen. This caused a
FloatingActionButton to be clipped, but if you put a scrolling widget in
the sheet with text at the very bottom, it was impossible to scroll the
text into view. This PR removes the top padding, and changes the bottom
padding to equal the amount offscreen.

Before:
<img width="396" alt="Screenshot 2025-01-30 at 11 21 36 AM"
src="https://github.com/user-attachments/assets/4e27db47-8d54-44c7-8cba-58790b88fef3"
/>

After:
<img width="396" alt="Screenshot 2025-01-30 at 11 19 54 AM"
src="https://github.com/user-attachments/assets/68f056f2-7731-4a56-8124-187d7efae020"
/>


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-02-04 18:33:57 +00:00
..