setConfig method
Future<bool>
setConfig({
- required String appId,
- required String appSecret,
- required String serverAppId,
- required String serverEncodingKey,
- required String serverToken,
- required int companyId,
- required bool isAgreePrivacy,
- String? serverUrl,
override
Implementation
@override
Future<bool> setConfig(
{required String appId,
required String appSecret,
required String serverAppId,
required String serverEncodingKey,
required String serverToken,
required int companyId,
required bool isAgreePrivacy,
String? serverUrl}) async {
Map<String, dynamic> config = {
if (serverUrl != null) 'serverUrl': serverUrl,
"appId": appId,
"appSecret": appSecret,
"serverAppId": serverAppId,
"serverEncodingKey": serverEncodingKey,
"serverToken": serverToken,
"companyId": companyId,
"isAgreePrivacy": isAgreePrivacy
};
config.removeWhere((key, value) => value == null);
final result = await methodChannel.invokeMethod<bool>('setConfig', config);
return result ?? false;
}