checkAuthenticated method

Future<void> checkAuthenticated()

Ensures the user is authenticated.

If the user is not authenticated, an exception is thrown.

Returns a Future that completes if the user is authenticated.

Implementation

Future<void> checkAuthenticated() async {
  // Check if the user is authenticated
  if (!authService.isAuthenticated()) {
    // Throw an exception if the user is not authenticated
    throw Exception('User not authenticated');
  }
}