AuthyoTheme class

Colour / text / layout tokens for the built-in dialog.

Every field has a default so a theme can be built from nothing, from the remote customization returned by the Authyo dashboard, or from a partial override supplied by the host app via AuthyoService.init(theme: ...). Use merge to layer them: defaults.merge(remote).merge(local).

Annotations

Constructors

AuthyoTheme({Color? primary, Color? background, Color? surface, Color? inputBackground, Color? inputBorder, Color? inputText, Color? buttonColor, Color? buttonTextColor, Color? buttonBorderColor, Color? socialButtonColor, Color? socialButtonTextColor, Color? socialButtonBorderColor, String? headerText, Color? headerTextColor, bool? showHeader, String? bodyText, Color? bodyTextColor, bool? showBody, String? logoUrl, bool? hideBranding, int? resendTimerSeconds, AuthyoButtonShape? buttonShape, AuthyoMainLayout? mainLayout, AuthyoSocialLayout? socialLayout, String? fontFamily, String? privacyLink, String? termsLink, double? glassOpacity, AuthyoButtonShape? inputShape, bool? inputUnderline, AuthyoButtonShape? socialButtonShape, bool? socialButtonsFullWidth, bool? otpHidden, bool? rememberMe, int? rememberMeDays})
const
AuthyoTheme.fromCustomization(Map<String, dynamic>? json)
Builds a partial theme from the appCustomizationModel JSON returned by the Authyo backend. Only keys present (and parseable) are set, so the result is meant to be merged over defaults.
factory

Properties

background → Color?
final
bodyText → String?
final
bodyTextColor → Color?
final
buttonBorderColor → Color?
final
buttonColor → Color?
final
buttonShape → AuthyoButtonShape?
final
buttonTextColor → Color?
final
fontFamily → String?
final
glassOpacity → double?
Glassmorphism only: opacity of the frosted card, 0.2–1.0 (dashboard "Glass Opacity" slider, stored as 20–100).
final
hashCode → int
The hash code for this object.
no setterinherited
headerText → String?
final
headerTextColor → Color?
final
hideBranding → bool?
final
inputBackground → Color?
final
inputBorder → Color?
final
inputShape → AuthyoButtonShape?
Corner shape of the input fields (dashboard "Input Style"). Null = follow buttonShape.
final
inputText → Color?
final
inputUnderline → bool?
Dashboard "Input Style" = borderless: inputs draw only a bottom line.
final
Local logo override (e.g. AssetImage('assets/my_logo.png')).
final
logoUrl → String?
Remote logo. Falls back to logo and then to the bundled Authyo logo.
final
mainLayout → AuthyoMainLayout?
final
otpHidden → bool?
Dashboard "Hide OTP": typed digits are masked like a password.
final
primary → Color?
final
final
rememberMe → bool?
Dashboard "Remember me": show the checkbox in the dialog. Off = no checkbox, nothing sent, nothing stored.
final
rememberMeDays → int?
Days a remembered session stays valid (server side), 1..365.
final
resendTimerSeconds → int?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showBody → bool?
final
showHeader → bool?
final
final
socialButtonBorderColor → Color?
final
socialButtonColor → Color?
final
socialButtonsFullWidth → bool?
Dashboard "Social Button Size": true = one full-width button per provider (icon + name, stacked); false = a row of small icon buttons.
final
socialButtonShape → AuthyoButtonShape?
Corner shape of the social login buttons (dashboard "Social Button Style"). Null = follow buttonShape (apps configured before the setting existed). Pill makes the small icon buttons circular, like the web widget.
final
socialButtonTextColor → Color?
final
socialLayout → AuthyoSocialLayout?
final
surface → Color?
final
final

Methods

merge(AuthyoTheme? other) → AuthyoTheme
Returns a copy where every non-null field of other replaces this one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve() → AuthyoResolvedTheme
A fully populated view of this theme (every getter non-null), used by the style renderers. Falls back to defaults for anything unset.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

parseColor(Object? raw) → Color?
Parses #RGB, #RRGGBB, #AARRGGBB, rgb(r,g,b) and rgba(r,g,b,a). Returns null when the value is missing or unparseable.
stylePalette(AuthyoDesignStyle style, {Color? primary}) → AuthyoTheme
Default palette for a design style — the same values the Authyo dashboard loads into the Color tab when that style is picked, so a locally pinned style looks like the dashboard preview. Layered under the dashboard / local values: defaults.merge(stylePalette).merge(remote).

Constants

defaults → const AuthyoTheme
Built-in defaults: the 1.0.x look (Authyo blue, white surface, pill button).