AuthyoStyle class abstract

Base renderer for the verification dialog.

The dialog is built from a fixed set of slots (card, OTP field, primary button, icon buttons, social buttons, text styles). A design style overrides the decoration of those slots but never the behaviour — the logic lives in VerificationController.

The defaults here produce the Flat look; the other styles subclass this and override only what differs.

Implementers

Constructors

AuthyoStyle(AuthyoResolvedTheme theme)

Properties

barrierColor → Color
Colour drawn behind the dialog.
no setter
bodyStyle → TextStyle
no setter
brandStyle → TextStyle
no setter
buttonHeight → double
Height of the primary button.
no setter
buttonRadius → double
Corner radius for buttons (driven by the dashboard buttonStyle).
no setter
cardPadding → EdgeInsets
Padding inside the card.
no setter
cardRadius → double
Card corner radius.
no setter
fontFamily → String?
Base font family applied to everything in the dialog.
no setter
hashCode → int
The hash code for this object.
no setterinherited
headerStyle → TextStyle
no setter
iconTint → Color
Colour used to tint the channel/social icon images.
no setter
id → AuthyoDesignStyle
no setter
infoStyle → TextStyle
no setter
inputRadius → double
Corner radius for the OTP input.
no setter
linkStyle → TextStyle
no setter
mutedStyle → TextStyle
no setter
otpBoxGap → double
Gap between OTP digit boxes.
no setter
otpBoxSize → Size
Size of one OTP digit box (the web widget uses 40px boxes, 8px apart).
no setter
otpTextStyle → TextStyle
Text style of the digits typed in the OTP field.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
socialButtonRadius → double
Corner radius for the social login buttons (dashboard "Social Button Style"; follows buttonRadius when not set).
no setter
theme → AuthyoResolvedTheme
Resolved (non-nullable) theme tokens.
final

Methods

attemptsPill(int remaining, int max) → Widget
"N of M attempts remaining" pill. Colour escalates as the number drops, matching the expiry bar's urgency language.
backButton(VoidCallback onTap) → Widget
Round "back" control in the card's top-left corner (the web widget's back button). Leaves the OTP screen so the identity can be changed.
backdrop(BuildContext context, Widget dialog) → Widget
Full-screen layer drawn behind the (already centred, scrollable) dialog. Styles with a special backdrop (blur, gradient) override this and must return dialog on top of their own layers.
buttonInk({required VoidCallback? onPressed, required double radius, required Widget child}) → Widget
buttonLabel(String label, bool loading, Color color) → Widget
cardDecoration() → BoxDecoration
Decoration of the dialog card.
checkbox({required String label, required bool value, required ValueChanged<bool> onChanged}) → Widget
"Remember me" checkbox (only rendered when the dashboard enabled it).
circleIconButton({required Widget icon, required VoidCallback? onTap, String? tooltip, double size = 48}) → Widget
Circular icon button used for the resend channels (SMS / WhatsApp / Call).
decorateCard(Widget card) → Widget
Wraps the decorated card (e.g. with a blur filter or an overlay).
decorateInput(Widget field) → Widget
Extra chrome a style paints around an input (inset shadow, frost, clay drop…). Applied to the single-field otpField and to every digit box of otpBox, so both looks stay identical. Not used for the underline input style, which is chrome-less in every design.
divider(String label) → Widget
Thin separator used between social buttons and the OTP form.
errorText(String text, {TextAlign? align}) → Widget
Red "Invalid OTP. Please try again." line under the boxes.
logoFrame() → Widget
Frame around the logo (e.g. a plate in skeuomorphic style).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
otpBox({required TextEditingController controller, required FocusNode focusNode, required ValueChanged<String> onChanged, bool autofocus = false}) → Widget
One digit box of the OTP entry; the dialog renders one per digit, with auto-advance and auto-verify like the web widget.
otpField({required TextEditingController controller, required String hint, String? label, FormFieldValidator<String>? validator, ValueChanged<String>? onSubmitted, int? maxLength}) → Widget
Single-field OTP input (kept for hosts that build their own layout).
otpInputDecoration({required String hint, String? label}) → InputDecoration
Decoration for the OTP input field.
primaryButton({required String label, required VoidCallback? onPressed, bool loading = false}) → Widget
The main "Verify" button.
progress() → Widget
Progress indicator shown while a request is in flight.
progressBar({required double fraction, required Color color, double height = 6}) → Widget
Slim rounded bar that drains as fraction (1 → 0) falls: the OTP expiry and the resend cooldown both use it.
sentToRow({required String target, VoidCallback? onChange, bool verified = false}) → Widget
"OTP sent to: …" chip with the "Change" link beside it, like the web widget's row under the header. onChange null hides the link (verified state). verified swaps the "OTP sent to:" prefix for the widget's green-ticked envelope / phone icon in front of the identity.
socialButton({required Widget icon, required String label, required VoidCallback? onTap}) → Widget
Full-width social login button ("Continue with Google").
socialIconButton({required Widget icon, required VoidCallback? onTap, String? tooltip}) → Widget
Compact social button (icon only) used when there are many providers.
statusText(String text, {bool error = false, TextAlign? align, Color? color, FontWeight? weight}) → Widget
Countdown / expiry line under the OTP boxes. error switches to the red "OTP expired…" look; color overrides the text colour (the expiry label shifts blue → amber → red as time runs out).
textButton({required String label, required VoidCallback? onPressed}) → Widget
A flat text-only action (e.g. "Resend OTP").
toString() → String
A string representation of this object.
inherited
underlineInputDecoration({required String hint, String? label}) → InputDecoration
Borderless variant used when the dashboard "Input Style" is set to underline: no fill, only a bottom line, in every design style.
verifiedBadge({String message = 'Verified successfully'}) → Widget
Green ring + check + "Verified successfully", shown inside the card once verification succeeds (same as the web widget).
verifiedIdentityIcon({required bool email}) → Widget
Green-ticked envelope (email) or phone icon shown in front of the identity once it is verified.

Operators

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

Static Methods

urgencyColor(double fraction) → Color
Blue → amber → red as fraction (time left, 1 → 0) runs down.

Constants

progressAmber → const Color
progressBlue → const Color
progressRed → const Color
progressTrack → const Color
resendLabel → const Color
resendPurple → const Color