Add Mind-Maps with AI generation and visual graph

This commit is contained in:
2026-03-27 19:53:20 +05:00
parent 789ecd9d3a
commit 26ef99d194
3 changed files with 808 additions and 33 deletions
+21
View File
@@ -166,6 +166,27 @@ class FirestoreService {
.delete();
}
Stream<List<MindMapNode>> watchMindMapNodes(String projectId) {
return _db
.collection('mindmaps')
.doc(projectId)
.collection('nodes')
.orderBy('level')
.snapshots()
.map((snapshot) => snapshot.docs
.map((doc) => MindMapNode.fromFirestore(doc))
.toList());
}
Future<void> deleteMindMapNode(String projectId, String nodeId) async {
await _db
.collection('mindmaps')
.doc(projectId)
.collection('nodes')
.doc(nodeId)
.delete();
}
// === CALENDAR EVENTS ===
Future<void> createEvent(CalendarEventModel event) async {
await _db.collection('events').doc(event.id).set(event.toFirestore());