更新时间:2023-11-26 09:05:46
you可以尝试这样做,尽管我使用的是IDS
you could try doing it this way though im usi IDS
static Future<bool> checkExist(String docID) async {
bool exists = false;
try {
await Firestore.instance.document("users/$docID").get().then((doc) {
if (doc.exists)
exists = true;
else
exists = false;
});
return exists;
} catch (e) {
return false;
}
}