isDark static method

bool isDark(
  1. BuildContext context
)

Checks if the current theme is dark mode.

Implementation

static bool isDark(BuildContext context) {
  return getBrightness(context) == Brightness.dark;
}