checkAuth method

  1. @override
void checkAuth()
override

Checks if the user has provided authorization credentials.

Raises YTMusicUserError if the user is not authorized.

Implementation

@override
void checkAuth() {
  if (authType == AuthType.unauthorized) {
    throw YTMusicUserError(
      'Please provide authentication before using this function',
    );
  }
}