initGeTui function

Future<bool> initGeTui({
  1. String? appId,
  2. String? appKey,
  3. String? appSecret,
})

初始化sdk

Implementation

Future<bool> initGeTui(
    {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', <String, dynamic>{
      'appId': appId,
      'appKey': appKey,
      'appSecret': appSecret
    });
  }
  return state ?? false;
}