Skip to main content

Theme

The SDK ships with several named themes, each in dark and light variants.

Built-in themes

ThemeDarkLight
ChatoshiSsoResolvedTheme.chatoshiDark()SsoResolvedTheme.chatoshiLight()
VIPSsoResolvedTheme.vipDark()SsoResolvedTheme.vipLight()
HeroSsoResolvedTheme.heroDark()SsoResolvedTheme.heroLight()

Set at init

await SsoSdk.initialize(SsoConfig(
baseUrl: '...',
origin: SsoOrigin.heroDev,
appName: 'MyApp',
theme: SsoResolvedTheme.vipDark(),
));

Override per screen

SsoSdk.authScreen(
enabledProviders: [...],
theme: SsoResolvedTheme.chatoshiLight(), // overrides the init theme
);

Theme structure

SsoResolvedTheme contains all design tokens used by SDK widgets:

GroupClassDescription
textSsoTextColorsPrimary, secondary, tertiary, disabled, etc.
brandSsoBrandColorsPrimary brand color + inverse
surfaceSsoSurfaceColorsSurface / card backgrounds
backgroundSsoBackgroundColorsPage backgrounds
borderSsoBorderColorsBorder colors
interactiveSsoInteractiveColorsButton states (default, hover, pressed)
alertsSsoAlertColorsSuccess, error, warning, info
accentSsoAccentColorsAccent / highlight colors
disabledSsoDisabledColorsDisabled state colors
gradientSsoGradientTokensGradient colors
gradientsSsoThemeGradientsPre-built LinearGradient objects
shadowBoxShadowElevation shadow

Standalone tokens

TokenTypeConstructor default
fontFamilyString'Inter'
isDarkbooltrue
radiusButtondouble8.0
radiusInputdouble8.0
radiusBlockdouble24.0
radiusButtonIcondouble1000.0
radiusBottomSheetdouble8.0

The defaults above apply when you construct SsoResolvedTheme(...) directly. Each built-in theme overrides the button / input radius to match its visual style:

ThemeradiusButtonradiusInput
Chatoshi (dark / light)10.010.0
VIP (dark / light)8.08.0
Hero (dark / light)100.0 (pill)14.0

Radius values are consumed by SsoButton, SsoInput and related widgets, so changing them in a custom theme immediately reshapes the controls.