modeOf static method

ThemeMode modeOf(
  1. BuildContext context
)

Returns the current theme mode.

Returns ThemeMode.system for backward compatibility if no NakiThemeProvider is in the component tree.

Implementation

static ThemeMode modeOf(BuildContext context) =>
    of(context)?.mode ?? ThemeMode.system;