mirrored_repositories/dipantau-desktop/lib/core/util
enum AppearanceMode {
  system,
  light,
  dark,
}

extension AppearanceModeExtension on String {
  AppearanceMode? get fromStringAppearanceMode {
    if (this == AppearanceMode.system.name) {
      return AppearanceMode.system;
    } else if (this == AppearanceMode.light.name) {
      return AppearanceMode.light;
    } else if (this == AppearanceMode.dark.name) {
      return AppearanceMode.dark;
    }
    return null;
  }
}