fetchAccountData method

dynamic fetchAccountData()

현재 서비스에 로그인되어 있는 경우, 디미고인 API에서 받아온 최신 데이터로 패치를 진행하는 함수입니다.

Implementation

fetchAccountData() async {
  if (!(await validateAccessToken())) { await refreshAccessToken(); }

  bool isSuccessStoreData = await storeUserData();
  if (!isSuccessStoreData) { _currentUser = DimigoinUser.fromJson(json.decode((await _storage.read(key: "dimigoinAccount_userInfo"))!)); _userChangeController.add(_currentUser); }
}