toJson static method

String? toJson(
  1. ThemeMode? style
)

Implementation

static String? toJson(ThemeMode? style) {
  switch (style) {
    case ThemeMode.light:
      return 'alwaysLight';
    case ThemeMode.dark:
      return 'alwaysDark';
    case ThemeMode.system:
    default:
      return 'automatic';
  }
}