LenraApplication constructor

LenraApplication({
  1. Key? key,
  2. required String clientId,
  3. required Widget child,
  4. String? appName,
  5. String? applicationId,
  6. @Deprecated("Use 'applicationId' instead.") String? androidapplicationId,
  7. String socketEndpoint = kDebugMode ? "ws://localhost:4001/socket/websocket" : "wss://api.lenra.io/socket/websocket",
  8. String oauthBaseUri = kDebugMode ? "http://localhost:4444" : "https://auth.lenra.io",
  9. String oauthRedirectPath = "/redirect.html",
  10. int? oauthRedirectPort,
  11. List<String> scopes = const ["app:websocket"],
  12. String? clientSecret,
  13. Widget? loader,
  14. LoginWidgetBuilder? loginWidgetBuilder,
  15. LenraOauth2Helper? oauth2helper,
  16. 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;
}