StreamChatPersistenceClient constructor
StreamChatPersistenceClient({
- ConnectionMode connectionMode = ConnectionMode.regular,
- Level logLevel = Level.WARNING,
- bool webUseExperimentalIndexedDb = false,
- LogHandlerFunction? logHandlerFunction,
Creates a new instance of the stream chat persistence client
Implementation
StreamChatPersistenceClient({
/// Connection mode on which the client will work
ConnectionMode connectionMode = ConnectionMode.regular,
Level logLevel = Level.WARNING,
/// Whether to use an experimental storage implementation on the web
/// that uses IndexedDB if the current browser supports it.
/// Otherwise, falls back to the local storage based implementation.
bool webUseExperimentalIndexedDb = false,
LogHandlerFunction? logHandlerFunction,
}) : _connectionMode = connectionMode,
_webUseIndexedDbIfSupported = webUseExperimentalIndexedDb,
_logger = Logger.detached('💽')..level = logLevel {
_logger.onRecord.listen(logHandlerFunction ?? _defaultLogHandler);
}