LenraApplication constructor
LenraApplication({
- Key? key,
- required String clientId,
- required Widget child,
- String? appName,
- String? applicationId,
- @Deprecated("Use 'applicationId' instead.") String? androidapplicationId,
- 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,
- bool autoConnect = false,
Creates a new instance of LenraOauth2Widget
.
Implementation
LenraApplication({
super.key,
required this.clientId,
required this.child,
this.appName,
String? applicationId,
@Deprecated("Use 'applicationId' instead.") String? androidapplicationId,
this.socketEndpoint = kDebugMode
? "ws://localhost:4001/socket/websocket"
: "wss://api.lenra.io/socket/websocket",
this.oauthBaseUri =
kDebugMode ? "http://localhost:4444" : "https://auth.lenra.io",
this.oauthRedirectPath = "/redirect.html",
int? oauthRedirectPort,
this.scopes = const ["app:websocket"],
this.clientSecret,
this.loader,
this.loginWidgetBuilder,
this.oauth2helper,
this.autoConnect = false,
}) {
this.oauthRedirectPort =
oauthRedirectPort ?? (kIsWeb ? Uri.base.port : 10000);
this.applicationId =
applicationId ?? androidapplicationId ?? defaultApplicationId;
}