Authgear constructor

Authgear({
  1. required String clientID,
  2. required String endpoint,
  3. String name = "default",
  4. bool shareSessionWithSystemBrowser = false,
  5. Future<void> sendWechatAuthRequest(
    1. String
    )?,
  6. TokenStorage? tokenStorage,
})

Implementation

Authgear({
  required this.clientID,
  required this.endpoint,
  this.name = "default",
  this.shareSessionWithSystemBrowser = false,
  this.sendWechatAuthRequest,
  TokenStorage? tokenStorage,
})  : _tokenStorage = tokenStorage ?? PersistentTokenStorage(),
      _storage = PersistentContainerStorage() {
  final plainHttpClient = Client();
  final authgearHttpClient = AuthgearHttpClient(this, plainHttpClient);
  _apiClient = APIClient(
    endpoint: endpoint,
    plainHttpClient: plainHttpClient,
    authgearHttpClient: authgearHttpClient,
  );
}