GoTrueClient constructor

GoTrueClient({
  1. String? url,
  2. Map<String, String>? headers,
  3. bool? autoRefreshToken,
  4. CookieOptions? cookieOptions,
  5. Client? httpClient,
})

Implementation

GoTrueClient({
  String? url,
  Map<String, String>? headers,
  bool? autoRefreshToken,
  CookieOptions? cookieOptions,
  Client? httpClient,
}) {
  this.autoRefreshToken = autoRefreshToken ?? true;

  final _url = url ?? Constants.defaultGotrueUrl;
  final _header = {
    ...Constants.defaultHeaders,
    if (headers != null) ...headers,
  };
  api = GoTrueApi(
    _url,
    headers: _header,
    cookieOptions: cookieOptions,
    httpClient: httpClient,
  );
}