updateDeviceToken method

dynamic updateDeviceToken()

Implementation

updateDeviceToken() async {
  await FirebaseFirestore.instance
      .collection("devices${appIdEnumToString[appId]}")
      .doc(await deviceId)
      .set({
    "userId": _user?.uid,
    "token": await FirebaseMessaging.instance.getToken(),
    "lastUpdated": DateTime.now(),
  }, SetOptions(merge: true));
}