pub struct WindowInsets {
pub view_padding: EdgeInsets,
pub view_insets: EdgeInsets,
pub corner_insets: CornerInsets,
}Expand description
The window’s inset state, mirroring Flutter’s ViewportMetrics; Default is
no occlusion.
Fields§
§view_padding: EdgeInsetsSystem-UI-occluded edges (status/navigation bars, cutout); never the IME.
view_insets: EdgeInsetsFully obscured edges: in practice the on-screen keyboard.
corner_insets: CornerInsetsImplementations§
Source§impl WindowInsets
impl WindowInsets
Sourcepub fn new(view_padding: EdgeInsets, view_insets: EdgeInsets) -> Self
pub fn new(view_padding: EdgeInsets, view_insets: EdgeInsets) -> Self
From the two per-edge sets, with CornerInsets::ZERO.
pub fn with_corner_insets(self, corner_insets: CornerInsets) -> Self
Sourcepub fn padding(&self) -> EdgeInsets
pub fn padding(&self) -> EdgeInsets
The safe-area padding a SafeArea insets by: view_padding - view_insets
per edge, saturating at zero (Flutter’s formula). Never transported.
Trait Implementations§
Source§impl Clone for WindowInsets
impl Clone for WindowInsets
impl Copy for WindowInsets
Source§impl Debug for WindowInsets
impl Debug for WindowInsets
Source§impl Default for WindowInsets
impl Default for WindowInsets
Source§impl PartialEq for WindowInsets
impl PartialEq for WindowInsets
impl StructuralPartialEq for WindowInsets
Auto Trait Implementations§
impl Freeze for WindowInsets
impl RefUnwindSafe for WindowInsets
impl Send for WindowInsets
impl Sync for WindowInsets
impl Unpin for WindowInsets
impl UnsafeUnpin for WindowInsets
impl UnwindSafe for WindowInsets
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.