Obtaining User Reference for Authenticated User

In my custom Flutter function, I want to compare a Users document reference (userRef) to the user reference of the currently authenticated user. In the FlutterFlow builder, this comparison is easy to do, but within custom actions, I'm unsure how to retrieve the User reference for the authenticated user via code! Any guidance or tips would be greatly appreciated!

Here's a snippet of what I've tried:

if (userRef != authenticated.userRef) { // Perform some action... }

tldr: I've successfully obtained the userRef referencing a Users document, but I'm stuck on how to acquire the reference pointing to the authenticated user within a custom function.

1
6 replies