ChatwootAuthenticationProvider constructor

ChatwootAuthenticationProvider({
  1. required String userId,
  2. required String name,
  3. required String apiEndpoint,
  4. required String inboxIdentifier,
  5. Dio? dio,
  6. SharedPreferences? prefs,
})

Creates a new ChatwootAuthenticationProvider instance with the given userId, name, apiEndpoint and inboxIdentifier

userId is the unique identifier of the user and name is the name of the user. You should provide a chatwoot apiEndpoint in order to talk to the desired chatwoot instance. inboxIdentifier is the identifier of the inbox you want to use.

Implementation

ChatwootAuthenticationProvider({
  required String userId,
  required String name,
  required String apiEndpoint,
  required String inboxIdentifier,
  Dio? dio,
  this.prefs,
})  : _userId = userId,
      _name = name,
      _apiEndpoint = apiEndpoint,
      _inboxIdentifier = inboxIdentifier,
      dio = dio ?? Dio(BaseOptions(baseUrl: apiEndpoint));