getCurrentUser method

User? getCurrentUser()

Gets the current user

Implementation

User? getCurrentUser() {
  try {
    return _auth.currentUser;
  } catch (e) {
    // Log the error for debugging
    logError(e, StackTrace.current, context: 'getCurrentUser');
    return null;
  }
}