setUserLastSeen method

dynamic setUserLastSeen(
  1. User? logInUser
)

Implementation

setUserLastSeen(User? logInUser) async {
  if (logInUser != null)
    await FirebaseFirestore.instance
        .collection(getDocName())
        .doc(logInUser.uid)
        .set({
      'lastActive': DateTime.now().millisecondsSinceEpoch,
      'online': 'online'
    }, SetOptions(merge: true));
}