Commit 277bfe6
authored
Support iPhone X safe area insets (flutter#4302)
This change exposes the view safe area insets (introduced in iOS 11) to
the framework via MediaQuery.of(context).padding. Safe area insets are
the view insets (padding) inside of which content can be relied on to
display without truncation/clipping, as would occur with e.g. the iPhone
X sensor notch.
As this API was added in iOS 11, we place it behind a runtime guard
checking OS level.
Until the runtime support for @avialable lands in the next Fuchsia
buildtools rev, ignore -Wunguarded-availability-new around the safe area
insets check and use an FML runtime check instead.1 parent b8fc6b7 commit 277bfe6
File tree
1 file changed
+16
-1
lines changed- shell/platform/darwin/ios/framework/Source
1 file changed
+16
-1
lines changedLines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
604 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
605 | 620 | | |
606 | 621 | | |
607 | 622 | | |
| |||
0 commit comments