isDarkMode static method

bool isDarkMode(
  1. BuildContext context
)

Implementation

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