useDarkMode method

void useDarkMode(
  1. BuildContext context,
  2. T builder(
    1. T,
    2. bool
    )
)

Implementation

void useDarkMode(BuildContext context, T Function(T, bool) builder) {
  apply = builder(self, Theme.of(context).brightness == Brightness.dark);
}