AnonymousSignInWidget class

A widget that provides anonymous-based authentication functionality.

This is a placeholder widget to trigger a workflow that you would probably trigger in the background after a certain threshold of user activity. It is not a real sign-in widget.

Inheritance

Constructors

AnonymousSignInWidget({Key? key, AnonymousAuthController? controller, ServerpodClientShared? client, VoidCallback? onAuthenticated, Future<String?> createAnonymousToken()?, dynamic onError(Object error)?, AnonymousButtonSize size = AnonymousButtonSize.large, AnonymousButtonShape shape = AnonymousButtonShape.pill})
Creates an anonymous sign-in widget.
const

Properties

client ServerpodClientShared?
The Serverpod client instance.
final
controller AnonymousAuthController?
Controls the authentication state and behavior.
final
createAnonymousToken Future<String?> Function()?
Function to generate the anonymous token supplied to the login endpoint. This token can fill many roles, including app attestation if the onBeforeAnonymousAccountCreated callback is used to prevent abuse. If onBeforeAnonymousAccountCreated is not configured on the server, then this function and any token it would generate are likely meaningless.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAuthenticated VoidCallback?
Callback when authentication is successful.
final
onError → dynamic Function(Object error)?
Callback when an error occurs during authentication.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape → AnonymousButtonShape
The button shape.
final
size → AnonymousButtonSize
The button size.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<AnonymousSignInWidget>
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