init method

void init({
  1. required String appId,
  2. String? universalLink,
})

appId 微信appId universalLink for ios wechat

Implementation

void init({required String appId, String? universalLink}) {
  _appId = appId;
  _universalLink = universalLink ?? "";
  CloudChannelManager.instance.setMethodCall(["weChatPaySuccess"], (arguments) {
    if (_successCall != null) {
      _successCall!(1, arguments);
    }
  });
  CloudChannelManager.instance.setMethodCall(["weChatPayCancel"], (arguments) {
    if (_failCall != null) {
      _failCall!(4, arguments);
    }
  });
  CloudChannelManager.instance.setMethodCall(["weChatPayFail"], (arguments) {
    if (_failCall != null) {
      _failCall!(1, arguments);
    }
  });
  CloudChannelManager.instance.bindMethods();
}