setConfig static method

Future<void> setConfig({
  1. String? serverUrl,
  2. required String appId,
  3. required String appSecret,
  4. required String serverAppId,
  5. required String serverEncodingKey,
  6. required String serverToken,
  7. required int companyId,
  8. required bool isAgreePrivacy,
})

sdk设置 serverUrl: 服务器地址,不填写即为默认;形如:https://e.echatsoft.com appId: app唯一ID appSecret: app密钥 serverAppId: API接入ID serverEncodingKey: 消息加密key serverToken: API接入Token companyId: 公司Id, 如果是多商户接入则写入平台公司Id,如果是单商户接入则写入公司Id isAgreePrivacy: 是否同意隐私协议

Implementation

static Future<void> setConfig({
  String? serverUrl,
  required String appId,
  required String appSecret,
  required String serverAppId,
  required String serverEncodingKey,
  required String serverToken,
  required int companyId,
  required bool isAgreePrivacy,
}) =>
    EChatFlutterSdkPlatform.instance.setConfig(
      serverUrl: serverUrl,
      appId: appId,
      appSecret: appSecret,
      serverAppId: serverAppId,
      serverEncodingKey: serverEncodingKey,
      serverToken: serverToken,
      companyId: companyId,
      isAgreePrivacy: isAgreePrivacy,
    );