createClient static method
Future<void>
createClient(
- String currentAtSign,
- String? namespace,
- AtClientPreference preferences
Implementation
static Future<void> createClient(String currentAtSign, String? namespace,
AtClientPreference preferences) async {
currentAtSign = AtUtils.formatAtSign(currentAtSign)!;
if (_atClientInstanceMap.containsKey(currentAtSign)) {
return;
}
if (preferences.isLocalStoreRequired) {
var storageManager = StorageManager(preferences);
await storageManager.init(currentAtSign, preferences.keyStoreSecret);
}
var atClientImpl = AtClientImpl(currentAtSign, namespace, preferences);
await atClientImpl._init();
atClientImpl.logger
.info('AtClient init done for : ${atClientImpl.currentAtSign}');
_atClientInstanceMap[currentAtSign] = atClientImpl;
}