login method

Future<String> login(
  1. dynamic tag,
  2. dynamic password
)

Implementation

Future<String> login(tag, password) async {
  final loginDto = LoginRequestDto(tag: tag, password: password);
  final newUser = await repository.login(loginDto.toJson());

  if (newUser.tag != "") {
    isLogin.value = true;
    appUser.value = newUser;
    User.updatePrefs(newUser);
    return "success";
  } else {
    return prefs.read("loginFailureMsg") ?? "에러메시지in UserController";
  }
}