errorCode property

int errorCode

Implementation

int get errorCode{
  final Map<WechatLoginErrorCode, int> dictionary = {
    WechatLoginErrorCode.userDenied: -4,
    WechatLoginErrorCode.userCancel: -2,
    WechatLoginErrorCode.success: -1,
    WechatLoginErrorCode.getCodeSuccess: 0,
    WechatLoginErrorCode.getAccessTokenError: 1,
    WechatLoginErrorCode.getAccessTokenSuccess: 2,
    WechatLoginErrorCode.getUserInfoError: 3
  };

  if(dictionary.containsKey(this)){
    return dictionary[this]!;
  }

  return 4;
}