signOut static method

Future<void> signOut()

Implementation

static Future<void> signOut() async {
  try {
    await _googleSignIn?.disconnect(); // Revoke token
    await _googleSignIn?.signOut(); // Sign out locally
  } catch (e) {
    debugPrint("GoogleDriveProvider: Sign out error - $e");
  }

  _googleSignIn = null; // Clear scopes & cached state
  _instance?._isAuthenticated = false;
  _instance = null; // Reset the singleton
  debugPrint("GoogleDriveProvider: User signed out and GoogleSignIn reset.");
}