PhoneVerificationDialog class
The built-in OTP verification dialog.
Mirrors the web widget's OTP screen slot for slot: back button, logo, header / body text, "OTP sent to … Change", "Verify OTP", one box per digit (auto-advance, auto-verify on the last digit), the inline "Invalid OTP" line, the draining expiry bar, the "N of M attempts remaining" pill, the resend cooldown bar with its "Resend OTP" button, the expired screen with one button per channel, social logins, the verified badge, terms / privacy and branding. Every design style draws the same slots differently.
Usually shown for you by AuthyoService.sendOtp. To show it manually use
AuthyoService.instance.showVerificationDialog(...).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PhoneVerificationDialog
Constructors
- PhoneVerificationDialog({Key? key, required AuthyoResult authyoRes, required String to, void onVerificationComplete(AuthyoResult authyoResult)?, AuthyoStyle? style, AuthyoWidgetConfig config = AuthyoWidgetConfig.empty, int? otpLength, Duration verifiedDisplayDuration = const Duration(milliseconds: 1600), @visibleForTesting AuthyoService? service})
-
const
Properties
- authyoRes → AuthyoResult
-
Result of the
sendOtpcall that opened this dialog (carriesmaskIdand the OTP expiry used for the countdown).final - config → AuthyoWidgetConfig
-
Remote config (channels, social logins). Empty by default.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onVerificationComplete → void Function(AuthyoResult authyoResult)?
-
Called after a successful or failed verification, with the result.
On success it fires after the "Verified successfully" badge has been
shown and the dialog has closed.
final
- otpLength → int?
-
Expected OTP length (number of digit boxes). Defaults to 6.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- service → AuthyoService?
-
Test seam: service used for verify / resend / social calls.
final
- style → AuthyoStyle?
-
Renderer to use. Defaults to Flat with the default theme.
final
- to → String
-
Phone number or email the OTP was sent to.
final
- verifiedDisplayDuration → Duration
-
How long the success badge stays before the dialog closes.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PhoneVerificationDialog> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
resolveLogoUrl(
String? logoUrl, {String? serverUrl}) → String? -
Turns the dashboard
logoUrlinto something loadable: absolute URLs as is (the server already resolves uploaded logos to their public URL), a "/path" underserverUrl, anything else null = the server's default logo.
Constants
- defaultLogoPath → const String
- Path of the Authyo logo on the server, shown when the app has no logo of its own and in the "Powered by" line (same image the web widget loads).