init method
初始化sdk
Implementation
Future<bool> init({String? appId, String? appKey, String? appSecret}) async {
if (!_supportPlatform) return false;
bool? state = false;
if (_isAndroid) {
state = await _channel.invokeMethod<bool?>('initPush');
} else if (_isIOS) {
assert(appId != null);
assert(appKey != null);
assert(appSecret != null);
state = await _channel.invokeMethod<bool?>('initSDK',
{'appId': appId, 'appKey': appKey, 'appSecret': appSecret});
}
return state ?? false;
}