isLightMode property

bool get isLightMode

Checks if the current screen is in light mode.

Example:

if (context.isLightMode) { ... }

Implementation

bool get isLightMode => Theme.of(this).brightness == Brightness.light;