bindWithIdentifier method

void bindWithIdentifier({
  1. required String identify,
  2. required XGBindType bindType,
})

绑定账号或标签

Implementation

void bindWithIdentifier({
  required String identify,
  required XGBindType bindType,
}) {
  if (Platform.isIOS) {
    _channel.invokeMethod('bindWithIdentifier',
        {'identify': identify, 'bindType': bindType.index});
  } else {
    if (bindType.index == XGBindType.tag.index) {
      List identifys = List.empty(growable: true);
      identifys.add(identify);
      xgApi.addXgTags(tagNames: identifys);
    } else if (bindType.index == XGBindType.account.index) {
      xgApi.appendAccount(account: identify);
    }
  }
}