Custom Function to logout the current user.

Custom Code

I am trying to write a simple custom function that logs out a user when it is called. I have tried searching for an answer and using Chatgpt for endless suggestions, but I cannot get this to work. If someone can help me with this, it would be great.

I am using Firebase for authentication.

For background, I will try to call this function from another function that evaluates various conditions to determine whether a user needs to be logged out. I then hope to include this more complex function in the 'main.dart' so that it is run whenever the application launches.

What have you tried so far?

Internet searches, Chatgpt and lost of trying.

Did you check FlutterFlow's Documentation for this topic?
No
5 replies