statusBarHeight property

double get statusBarHeight

Returns the height of the status bar. This property retrieves the height of the system's status bar (e.g., the area with time and network indicators). If no MediaQuery context is available, it defaults to 0.0.

Implementation

double get statusBarHeight => MediaQuery.maybeOf(this)?.padding.top ?? 0.0;