errorMsg property
String
errorMsg
Implementation
String get errorMsg{
final Map<WechatLoginErrorCode, String> dictionary = {
WechatLoginErrorCode.userDenied: "用户拒绝授权",
WechatLoginErrorCode.userCancel: "用户取消",
WechatLoginErrorCode.success: "微信登录成功",
WechatLoginErrorCode.getCodeSuccess: "获取code成功",
WechatLoginErrorCode.getAccessTokenError: "获取accessToken失败",
WechatLoginErrorCode.getAccessTokenSuccess: "获取accessToken成功",
WechatLoginErrorCode.getUserInfoError: "获取微信用户信息失败"
};
if(dictionary.containsKey(this)){
return dictionary[this]!;
}
return "未知错误";
}