Class AppThemeUtils

java.lang.Object
com.vaadin.copilot.theme.AppThemeUtils

public class AppThemeUtils extends Object
Utility class for checking the current application theme in use.

This class provides helper methods to determine whether the active application theme is ApplicationTheme.LUMO or ApplicationTheme.AURA.

The methods rely on the ApplicationDetectedThemeHolder singleton to retrieve the currently detected ApplicationTheme.

Usage Example:


 if (AppThemeUtils.isLumo()) {
     // Apply Lumo-specific styling or logic
 }
 

This class cannot be instantiated.

  • Method Details

    • isLumo

      public static boolean isLumo()
      Checks if the currently active application theme is ApplicationTheme.LUMO.
      Returns:
      true if the detected theme is Lumo, false otherwise
    • isAura

      public static boolean isAura()
      Checks if the currently active application theme is ApplicationTheme.AURA.
      Returns:
      true if the detected theme is Aura, false otherwise