title: How to clear previous user cache data in Flutter Firebase?
body: <p>I am facing a problem of whenever a user signs out <code>FirebaseAuth.instance.signOut()</code> and signs In with another account the previous user's data is visible. I have seen documentation and got an idea of clearing the cache data using <code> FirebaseFirestore.clearPersistence()</code>. I tried this in the <code>signOut</code> method but though previous user's data is still visible. Can anyone please solve my issue!</p>
  <blockquote>
  <p>main.dart</p>
  </blockquote>
  <pre><code>void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp();
    FirebaseFirestore.instance.settings=Settings(
      persistenceEnabled: false,
    );
    runApp(MyApp());
  } 
  </code></pre>
  <blockquote>
  <p>firebaseAuth.dart</p>
  </blockquote>
  <pre><code>  static logOut()async{
      await FirebaseFirestore.instance.clearPersistence();
      return  FirebaseAuth.instance.signOut();
    }
  </code></pre>
  <p>THANK YOU SO MUCH!</p>