Skip to main content

SystemUiOverlayStyle

Struct SystemUiOverlayStyle 

Source
pub struct SystemUiOverlayStyle {
    pub system_navigation_bar_color: Option<Color>,
    pub system_navigation_bar_divider_color: Option<Color>,
    pub system_navigation_bar_icon_brightness: Option<Brightness>,
    pub system_navigation_bar_contrast_enforced: Option<bool>,
    pub status_bar_color: Option<Color>,
    pub status_bar_brightness: Option<Brightness>,
    pub status_bar_icon_brightness: Option<Brightness>,
    pub system_status_bar_contrast_enforced: Option<bool>,
}
Expand description

Specifies a system overlay style for a portion of the app.

Flutter counterpart: SystemUiOverlayStyle (services/system_chrome.dart). It lives here because Platform names it.

Fields§

§system_navigation_bar_color: Option<Color>

The color of the system bottom navigation bar.

Only honored in Android versions O and greater.

§system_navigation_bar_divider_color: Option<Color>

The color of the divider between the system’s bottom navigation bar and the app’s content.

Only honored in Android versions P and greater.

§system_navigation_bar_icon_brightness: Option<Brightness>

The brightness of the system navigation bar icons.

Only honored in Android versions O and greater. When set to Brightness::Light, the system navigation bar icons are light. When set to Brightness::Dark, the system navigation bar icons are dark.

§system_navigation_bar_contrast_enforced: Option<bool>

Overrides the contrast enforcement when setting a transparent navigation bar.

When setting a transparent navigation bar in SDK 29+, or Android 10 and up, a translucent body scrim may be applied behind the button navigation bar to ensure contrast with buttons and the background of the application.

SDK 28-, or Android P and lower, will not apply this body scrim.

Setting this to false overrides the default body scrim.

§status_bar_color: Option<Color>

The color of top status bar.

Only honored in Android version M and greater.

§status_bar_brightness: Option<Brightness>

The brightness of top status bar.

Only honored in iOS.

§status_bar_icon_brightness: Option<Brightness>

The brightness of the top status bar icons.

Only honored in Android version M and greater.

§system_status_bar_contrast_enforced: Option<bool>

Overrides the contrast enforcement when setting a transparent status bar.

When setting a transparent status bar in SDK 29+, or Android 10 and up, a translucent body scrim may be applied to ensure contrast with icons and the background of the application.

SDK 28-, or Android P and lower, will not apply this body scrim.

Setting this to false overrides the default body scrim.

Implementations§

Source§

impl SystemUiOverlayStyle

Source

pub const LIGHT: SystemUiOverlayStyle

System overlays should be drawn with a light color. Intended for applications with a dark background.

Source

pub const DARK: SystemUiOverlayStyle

System overlays should be drawn with a dark color. Intended for applications with a light background.

Source

pub const fn new() -> SystemUiOverlayStyle

Creates a new SystemUiOverlayStyle; Dart’s named arguments are the setters.

Source

pub fn system_navigation_bar_color(self, color: Color) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(systemNavigationBarColor:).

Source

pub fn system_navigation_bar_divider_color( self, color: Color, ) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(systemNavigationBarDividerColor:).

Source

pub fn system_navigation_bar_icon_brightness( self, brightness: Brightness, ) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(systemNavigationBarIconBrightness:).

Source

pub fn system_navigation_bar_contrast_enforced( self, enforced: bool, ) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(systemNavigationBarContrastEnforced:).

Source

pub fn status_bar_color(self, color: Color) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(statusBarColor:).

Source

pub fn status_bar_brightness( self, brightness: Brightness, ) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(statusBarBrightness:).

Source

pub fn status_bar_icon_brightness( self, brightness: Brightness, ) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(statusBarIconBrightness:).

Source

pub fn system_status_bar_contrast_enforced( self, enforced: bool, ) -> SystemUiOverlayStyle

Dart SystemUiOverlayStyle(systemStatusBarContrastEnforced:).

Source

pub fn copy_with(&self) -> SystemUiOverlayStyle

Creates a copy of this theme with the given fields replaced with new values.

Trait Implementations§

Source§

impl Clone for SystemUiOverlayStyle

Source§

fn clone(&self) -> SystemUiOverlayStyle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SystemUiOverlayStyle

Source§

impl Debug for SystemUiOverlayStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SystemUiOverlayStyle

Source§

fn default() -> SystemUiOverlayStyle

Returns the “default value” for a type. Read more
Source§

impl PartialEq for SystemUiOverlayStyle

Source§

fn eq(&self, other: &SystemUiOverlayStyle) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SystemUiOverlayStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,