chat fixed

This commit is contained in:
Juan Felipe Duarte
2023-05-04 16:57:27 -05:00
parent bc1357b7a6
commit 4807041bcf
7 changed files with 141 additions and 56 deletions
+3 -11
View File
@@ -173,17 +173,9 @@ class Event {
final snapshot = await FirebaseFirestore.instance
.collection('services')
.doc(uid)
.get()
.then((docSnapshot) {
if (docSnapshot.exists) {
print('info ${docSnapshot.data()}');
} else {
print('No se encontró ningún documento con la ruta especificada');
}
;
});
final Map<String, dynamic> data = snapshot.data();
return Event.fromJson(data);
.get();
final Map<String, dynamic>? data = snapshot.data();
return Event.fromJson(data!);
} catch (e) {
print('Error getting user: $e');
return Event(