SystemUiUtils class

Utility class to manage system UI (status bar, nav bar) appearance globally.

Works with both Android and iOS, and adapts icon colors automatically based on background color brightness.

Use this with GetX or globally in app entry points like main.dart, BaseView, etc.

Constructors

SystemUiUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

resetSystemUI(BuildContext context) → void
🔹 Reset system UI to match platform (system) theme.
setStatusBarColor(Color color, {bool isTransparent = false}) → void
🔹 Set only the status bar color, with auto icon contrast.
setSystemUI(Color color, {bool isTransparent = false}) → void
🔹 Set both status bar and navigation bar color, with icon brightness adjustment.
setTransparentStatusBar(Color colorBehindStatusBar, {Brightness? forceBrightness}) → void
🔹 Force a transparent status bar.