signOut method Null safety

Future<bool> signOut()

로그아웃을 시도합니다.

Implementation

Future<bool> signOut() async {
  try {
    LogManager().addLog("로그아웃 호출", screen: runtimeType.toString());
    await ApiService().unregisterNotificationToken();
    await Amplify.Auth.signOut();
    userState = Provider.of<UserState>(context, listen: false);
    userState.currentUser = null;
    LogManager().addLog("로그아웃 성공", screen: runtimeType.toString());
    return true;
  } catch (e) {
    LogManager().addLog("로그아웃 실패", screen: runtimeType.toString());
    rethrow;
  }
}