signOut method

Future<void> signOut()

Signs out the current user.

The account's replica stays on the device, scoped to it, so signing back in is instant and works offline (decision 0013). No other account reads it.

Implementation

Future<void> signOut() async {
  state = const AsyncLoading();

  state = await AsyncValue.guard(() async {
    await ref.read(notificationServiceProvider).deleteCurrentInstallation();
    await ref.read(authServiceProvider).signOut();
  });
}