1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| Future<void> removeImage(String groupId, String groupDetailId) { return Firestore.instance .collection("group") .document(groupId) .collection("group_item") .document(groupDetailId) .delete(); } ```
### データ有無チェック
```dart Query colRef = Firestore.instance .collection('user') .where('mobile', isEqualTo:_phoneNumber) .where('type',isEqualTo:'editor');
colRef.getDocuments().then((data){ if(data.documents.isNotEmpty){ data.documents.forEach((data){ print(data['Name']); }); Toast.show("authorize User", context, duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); } else{ Toast.show("Unauthorize User", context, duration: Toast.LENGTH_LONG, gravity: Toast.BOTTOM); } });
|