isDark static method

bool isDark(
  1. BuildContext context
)

Determines if the current theme is dark

Implementation

static bool isDark(BuildContext context) {
  return Theme.of(context).brightness == Brightness.dark;
}