LenraApplication class

A widget that handles the Lenra OAuth2 authentication flow.

Inheritance

Constructors

LenraApplication({Key? key, required String clientId, required Widget child, String? appName, String? applicaionId, @Deprecated("Use 'applicaionId' instead.") String? androidApplicaionId, String socketEndpoint = kDebugMode ? "ws://localhost:4001/socket/websocket" : "wss://api.lenra.io/socket/websocket", String oauthBaseUri = kDebugMode ? "http://localhost:4444" : "https://auth.lenra.io", String oauthRedirectPath = "/redirect.html", int? oauthRedirectPort, List<String> scopes = const ["app:websocket"], String? clientSecret, Widget? loader, LoginWidgetBuilder? loginWidgetBuilder, LenraOauth2Helper? oauth2helper})
Creates a new instance of LenraOauth2Widget.

Properties

applicaionId String
The Android application id. Not needed if you don't create an Android app.
getter/setter pair
appName String?
The name of the application.
final
child Widget
The UI to show after the authentication flow.
final
clientId String
The OAuth2 client ID.
final
clientSecret String?
The OAuth2 client secret. This is not secret in the context of a mobile app. It is only used to identify the app.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loader Widget?
The UI to show during the authentication flow.
final
loginWidgetBuilder LoginWidgetBuilder?
The UI to show after the authentication flow.
final
oauth2helper LenraOauth2Helper?
The OAuth2 helper for customizing OAuth configuration.
final
oauthBaseUri String
The lenra instance's OAuth base URI. Defaults to http://localhost:4444 in debug mode and https://auth.lenra.io in release mode.
final
oauthRedirectPath String
The OAuth2 redirect file path. Defaults to /redirect.html.
final
oauthRedirectPort int
The OAuth2 redirect port. Defaults to Uri.base.port in web platform and 10000 in other platforms.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopes List<String>
The OAuth2 scopes. Defaults to ["app:websocket"]
final
socketEndpoint String
The socket endpoint. Defaults to ws://localhost:4001/socket/websocket in debug mode and https://api.lenra.io/socket/websocket in release mode.
final

Methods

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